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

/command problem!
Author: Message:
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: RE: /command problem!
quote:
Originally posted by Mnjul
quote:
Originally posted by drizzdk
ChatWnd.SendMessage("DDDDOOOHHH");
Shouldn't that be oChatWnd? :)


code:
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
    if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) != null) {
       var command = RegExp.$1.toLowerCase();
       var parameter = RegExp.$2;
       oChatWnd.SendMessage("DDDDOOOHHH");
       Debug.Trace("command reconized: " + command + ", parameter: " + parameter);
       return "LOL!";
    }
}
Your code had some errors in it. !== should be !=, ChatWnd should be oChatWnd, otherwise it works fine.
10-20-2007 06:33 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
/command problem! - by drizzdk on 10-20-2007 at 04:40 PM
RE: /command problem! - by Spunky on 10-20-2007 at 06:03 PM
RE: /command problem! - by drizzdk on 10-20-2007 at 06:27 PM
RE: /command problem! - by Mnjul on 10-20-2007 at 06:31 PM
RE: RE: /command problem! - by vikke on 10-20-2007 at 06:33 PM
RE: /command problem! - by Mnjul on 10-20-2007 at 06:55 PM
RE: /command problem! - by drizzdk on 10-20-2007 at 07:06 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