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

Command Parsing Help
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Command Parsing Help
quote:
Originally posted by Stigmata
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    var CMD = Message.split(" ", 1);
    Debug.Trace(CMD[0]);
    if(MessageKind == 1){
        switch(CMD[0]){
            case "!date" : ChatWnd.SendMessage("The date is: (!D)"); break;
            case "!time" : ChatWnd.SendMessage("The time is: (!T)"); break;
        }           
    }
}


the debug shows that the correct (splitted) string was used.


The split function returns an Array!! Try the code above.
06-27-2006 09:14 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Command Parsing Help - by Stigmata on 06-27-2006 at 09:01 PM
RE: Command Parsing Help - by deAd on 06-27-2006 at 09:09 PM
RE: Command Parsing Help - by J-Thread on 06-27-2006 at 09:14 PM
RE: Command Parsing Help - by Stigmata on 06-27-2006 at 09:25 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