What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script Command

Script Command
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Script Command
quote:
Originally posted by markee
You have to return an empty string with commands, so it will be...
var test1 = 'Hello World!';

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

return ScriptCommands;
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
switch (Message) {
case "/test":
foo();
return "";
break;
}
}
function foo() {
ChatWnd.SendMessage(test1);
}


Code after a return doesn't execute does it? That means that the break is not needed :p
<Eljay> "Problems encountered: shit blew up" :zippy:
03-12-2007 03:44 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Script Command - by Bewwen on 03-11-2007 at 08:35 PM
RE: Script Command - by effection on 03-11-2007 at 08:41 PM
RE: Script Command - by NanaFreak on 03-11-2007 at 08:45 PM
RE: RE: Script Command - by Matti on 03-12-2007 at 05:18 PM
RE: Script Command - by Bewwen on 03-11-2007 at 09:07 PM
RE: Script Command - by effection on 03-11-2007 at 09:12 PM
RE: Script Command - by Bewwen on 03-11-2007 at 09:14 PM
RE: Script Command - by NanaFreak on 03-11-2007 at 09:14 PM
RE: Script Command - by markee on 03-11-2007 at 10:06 PM
RE: Script Command - by effection on 03-11-2007 at 10:24 PM
RE: Script Command - by Felu on 03-12-2007 at 08:42 AM
RE: Script Command - by Spunky on 03-12-2007 at 03:44 PM
RE: Script Command - by markee on 03-12-2007 at 03:58 PM
RE: Script Command - by Spunky on 03-12-2007 at 04:09 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On