Shoutbox

Calling script with command - 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: Calling script with command (/showthread.php?tid=85949)

Calling script with command by bangwazoo on 09-14-2008 at 08:33 PM

I'm new to messenger plus! scripting, I have installed some scripts and have been able to call them by writing /... in a chat window. I have now started trying to write my own scripts, can anyone tell me how i can call a function by writing "/something" in a window?

Thanks


RE: Calling script with command by Spunky on 09-14-2008 at 10:35 PM

CookieRevised's reply to Gettin data from "/" commands - Deciphering commands and parameters.

code:
function OnGetScriptCommands(){
     var ScriptCommands = "<ScriptCommands>";
     ScriptCommands    +=     "<Command>";
     ScriptCommands    +=         "<Name>test</Name>";
     ScriptCommands    +=         "<Description>testing</Description>";
     ScriptCommands    +=     "</Command>";
     ScriptCommands    += "</ScriptCommands>";
     return ScriptCommands;
}

You also need the above code to add you commands to the "command helper" window when someone types a "/" in the conversation window. This is not essential, but makes your script easier to use and I think Menthix mentioned not accepting scripts of sub-standard quality (which a script without out this would be)
RE: Calling script with command by bangwazoo on 09-15-2008 at 04:34 PM

Thanks, that works great.