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:
general sirhc
New Member
*


Posts: 11
Joined: Oct 2007
O.P. "/script" command
Could someone please tell me how to use the /script command apparently i can run a script when i have personalized status auto reply and just in the normal chat but i dont understand how it works. all it says is <function> <parameters>

EDIT: Thanks for the help i just thought it would be neat to have a script in my auto reply for personalized status but yeah its easier just to make a proper script

Thanks for future notice :D

This post was edited on 10-15-2007 at 02:46 AM by general sirhc.
10-14-2007 03:41 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: "/script" command
If you want to make a Plus! Live command (like "/me" or "/prefs"), you'll need to use OnEvent_ChatWndSendMessage to look for the command and parse it. The best way to do it is to use CookieRevised's excellent command parsing regular expression, which is explained in CookieRevised's reply to Gettin data from "/" commands.

If you really want to be able to use something like "/script MyFunction 123", the Plus! Live scripting documentation has a template for that:
quote:
Originally posted by Scripting Documentation > Events Reference > Messenger Plus! Events > Events Templates > ScriptsCommandTemplate

Example
The user sends the following message in a chat window:
code:
/script TestCommand "first text" text2
The script handles the event with the following function, displays the parameters in the debugging window and returns an empty string to prevent any message to be sent in the chat.
code:
function TestCommand(Wnd, Params)
{
    Debug.Trace("TestCommand has been called");

    var array = VBArray(Params).toArray();
    for(i = 0; i < array.length; i++)
        Debug.Trace(" Parameter: " + array[i]);

    return "";
}

However, it's more recommended to make a "real" command like "/me" than using "/script <function> <parameters>". And honestly, the first method is much faster to type, no? :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-14-2007 03:52 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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