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:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: script command
Put this code in your js file.

code:
function OnGetScriptCommands ()
{
commands  = "<ScriptCommands>";
commands +=     "<Command>";
commands +=         "<Name>Command 1</Name>"; //Dont put a "/"before the command
commands +=         "<Description>Description for command 1</Description>";
commands +=     "</Command>";
commands +=     "<Command>";
commands +=         "<Name>Command 2</Name>";
commands +=         "<Description>Description for command 2</Description>";
commands +=     "</Command>";
commands +=     "<Command>";
commands +=         "<Name>Command 3</Name>";
commands +=         "<Description>Description for command 3</Description>";
commands +=     "</Command>";
commands += "</ScriptCommands>";
return commands;
}


And to trigger a function when a command is used use -
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  if(Message.substr(0, 9) == '/command1')   { //"/" will be used here.
    Dosomething();
    return '';
    }
}


This post was edited on 08-16-2006 at 12:18 PM by Felu.
08-16-2006 12:17 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
script command - by lanky3 on 08-16-2006 at 10:40 AM
RE: script command - by Felu on 08-16-2006 at 12:17 PM
RE: script command - by lanky3 on 08-16-2006 at 12:41 PM
RE: script command - by lanky3 on 08-16-2006 at 07:26 PM
RE: script command - by matty on 08-16-2006 at 08:21 PM
RE: script command - by lanky3 on 08-16-2006 at 08:54 PM
RE: script command - by lanky3 on 08-18-2006 at 04:07 PM
RE: script command - by Felu on 08-18-2006 at 04:15 PM
RE: script command - by lanky3 on 08-18-2006 at 04:54 PM
RE: script command - by KnRd_WC on 08-18-2006 at 05:54 PM
RE: script command - by lanky3 on 08-18-2006 at 07:06 PM
RE: script command - by lanky3 on 08-18-2006 at 07:09 PM
RE: script command - by KnRd_WC on 08-18-2006 at 07:29 PM
RE: script command - by lanky3 on 08-20-2006 at 10:38 AM
RE: RE: script command - by mickael9 on 08-20-2006 at 11:19 AM
RE: script command - by lanky3 on 08-20-2006 at 11:29 AM


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