What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » im having troble with my script

im having troble with my script
Author: Message:
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
35 / Male / Flag
Joined: Oct 2004
RE: im having troble with my script
First, it would be a lot easier to have the switch nested inside the activate check, instead of having a whole bunch of activate checks.

Secondly, as said in the Scripting Docs (here), the ChatWndReceiveMessage event is triggered whenever anything is added to the history box in a chat window which includes messages sent by yourself. As such you must compare the Origin parameter to your current nickname to check that it was not you who sent the message before making any responses.

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message1, MessageKind)
{

if (activate == 1 && Origin != Messenger.MyName) {
    switch(Message1)
    {
        case "brb":
        ChatWnd.SendMessage('okey dokey');
        break;

        case "bye":
        ChatWnd.SendMessage('ok if u dont get lost soon i will kill you '+ Origin);
        ChatWnd.SendMessage('jk jk');
        break;
    }
}

}

NOTE: A known limitation is that if a user uses the exact same nickname as yourself they will be recognised as you, and as such will not be responded to by the script.

This post was edited on 08-08-2007 at 10:42 AM by Volv.
08-08-2007 10:40 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
im having troble with my script - by killa on 08-06-2007 at 05:23 PM
RE: im having troble with my script - by pollolibredegrasa on 08-06-2007 at 05:53 PM
RE: im having troble with my script - by killa on 08-07-2007 at 01:40 PM
RE: im having troble with my script - by Volv on 08-07-2007 at 01:55 PM
RE: im having troble with my script - by killa on 08-08-2007 at 10:00 AM
RE: im having troble with my script - by Volv on 08-08-2007 at 10:40 AM
RE: im having troble with my script - by LifelesS on 08-08-2007 at 10:51 AM
RE: im having troble with my script - by matty on 08-08-2007 at 12:47 PM
RE: im having troble with my script - by Volv on 08-08-2007 at 01:01 PM
RE: im having troble with my script - by Matti on 08-08-2007 at 03:19 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