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

hmm a problem...
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: hmm a problem...
quote:
Originally posted by uggi
you donīt understand what i want it to do
You want the script to trigger on your contact's machine only. If that's wrong, then please explain why.
quote:
Originally posted by mlevit
Uggi i think i might have got it.
code:
var sendingMessage = "";

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    sendingMessage = Message;
    return Message;
}

function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
    if (Message == sendingMessage)
    {
        //Do nothing
    }
    else
    {
        //Your code here
    }
}
Im not sure but i think this is what you're trying to achive?
It is, but it's an ugly way to do it. The better (and documented) way is:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
    if (Origin != Messenger.MyName) // Rejects your own messages
    {
        // Do stuff here
    }
}
This code block will only respond to the command if it was sent by someone other than yourself. This test is suggested in the Plus! documentation (and quoted several times above), and given you always compare the Origin to your current display name, it should be practically faultless.
I've also taken the liberty of simplifying the if{} construct to remove the unnecessary else {} clause.

There's only one thing that will bring this solution down: if your contact has the same display name as you. Which, let's face it, is very rare.
quote:
Originally posted by uggi
your behaviour and mood is rather than good
I just get frustrated when I'm making things clear, yet people don't get it. Well, I've now posted a full code sample, so hopefully it's irrevocably clear now [Image: msn_wink.gif]
quote:
Originally posted by uggi
Forget this question
No :P
[Image: spartaafk.png]
08-04-2006 01:49 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
hmm a problem... - by uggi on 08-03-2006 at 05:11 PM
RE: hmm a problem... - by rob_botch on 08-04-2006 at 09:29 AM
RE: RE: hmm a problem... - by uggi on 08-04-2006 at 10:14 AM
RE: hmm a problem... - by mlevit on 08-04-2006 at 10:21 AM
RE: hmm a problem... - by RaceProUK on 08-04-2006 at 10:29 AM
RE: hmm a problem... - by uggi on 08-04-2006 at 10:45 AM
RE: hmm a problem... - by RaceProUK on 08-04-2006 at 10:51 AM
RE: RE: hmm a problem... - by uggi on 08-04-2006 at 12:22 PM
RE: hmm a problem... - by RaceProUK on 08-04-2006 at 12:25 PM
RE: RE: hmm a problem... - by uggi on 08-04-2006 at 12:42 PM
RE: hmm a problem... - by mlevit on 08-04-2006 at 12:58 PM
RE: hmm a problem... - by RaceProUK on 08-04-2006 at 01:49 PM
RE: hmm a problem... - by uggi on 08-04-2006 at 02:36 PM
RE: hmm a problem... - by rob_botch on 08-04-2006 at 05:47 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