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

[Help] Code
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [Help] Code
The problems were:
  • Message.match only accepts a regular expression as parameter (e.g.: /Hello/i), where your script had an undefined variable Hello
  • you tried to send an undefined variable hi to the chat window
  • the script would respond on both your and the contacts messages
So, a solution when you really want to use regular expression would be:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    if(Message.match(/hello/i) && Origin != Messenger.MyName)
    {
        ChatWnd.SendMessage('Hi')
    }
}
But if you don't need regular expressions, you can just keep -!Felu!-'s version. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-10-2006 04:45 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Code - by Eddie on 09-10-2006 at 03:38 PM
RE: [Help] Code - by absorbation on 09-10-2006 at 03:41 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 03:41 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 03:48 PM
RE: [Help] Code - by Felu on 09-10-2006 at 03:58 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 04:00 PM
RE: [Help] Code - by Matti on 09-10-2006 at 04:45 PM
RE: [Help] Code - by vladinator on 09-25-2006 at 06:48 PM
RE: [Help] Code - by Eljay on 09-25-2006 at 07:09 PM
RE: [Help] Code - by Shondoit on 09-25-2006 at 07:20 PM
RE: RE: [Help] Code - by vladinator on 09-25-2006 at 07:32 PM
RE: [Help] Code - by DennisMartijn on 10-06-2006 at 05:07 PM
RE: [Help] Code - by Matti on 10-06-2006 at 05:10 PM
RE: [Help] Code - by vladinator on 10-07-2006 at 07:30 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