Shoutbox

Help required with Bead Draw Script - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Help required with Bead Draw Script (/showthread.php?tid=94740)

Help required with Bead Draw Script by Dragony on 06-07-2010 at 11:26 AM

Hi all. I'm an absolute newbie when it comes to scripting and Messenger Plus. I would like to make a script that when you type /beaddraw makes a little image of a red, white (with black outline), blue or yellow circle chosen at random appear in the chat window, about the size of the standard emote faces. Does anyone know how to do this please? Thankyou.


RE: Help required with Bead Draw Script by matty on 06-07-2010 at 01:02 PM

As far as I am aware there isn't away to interact with the "handwritting" programmatically that is made available in Windows Live Messenger.


RE: Help required with Bead Draw Script by whiz on 06-07-2010 at 06:08 PM

You could make custom emotions for each, with IDs like %bd:r%, %bd:w%, %bd:b% and %bd:y%, and then make a script that sends %bd:?%, where ? is replaced by a random letter (maybe using Math.random() and an array).

Javascript code:
var Letters = ["r", "w", "b", "y"];
 
function OnChatWndSendMessage(PlusWnd, Message)
{
    if (Message.toLowerCase() === "/beaddraw")
    {
        return "%bd:" + Letters[Math.floor(Math.random() * 3)] + "%";
    }
}