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



Posts: 3520
Reputation: 45
20 / Other / Flag
Joined: Jul 2003
O.P. Command Parsing Help
Now i wrote a quick command parsing bit for my script..

only thing is, the switch/case will not pick it up the string..

quote:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    var CMD = Message.split(" ", 1);
    Debug.Trace(CMD);
    if(MessageKind == 1){
        switch(CMD){
            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.

quote:
Function called: OnEvent_ChatWndReceiveMessage
!date


any ideas/help?
06-27-2006 09:01 PM
Profile PM Web 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