What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Origin and Messenger.MyName...

Origin and Messenger.MyName...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. Dodgy  Origin and Messenger.MyName...
I'm having an issue where I'm trying to see if a message sent to a conversation was sent by the current user, or the other contact.

Normally, I'd use something like this:
jscript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
    if (Origin === Messenger.MyName)
    {
        // current user sent it
    }
    else
    {
        // other contact sent it
    }
}
Although this wouldn't work if the other user had the same name, it was enough for what I was doing.

The problem now is: on Messenger 2011, the current user's name when sending a message (Origin) doesn't always match the name property (Messenger.MyName) if that has been changed by another script.  Although editing Messenger.MyName throws an error, it still actually changes, causing the comparison to return false (Origin holds the name set on the Windows Live profile, whereas Messenger.MyName stores the new nickname).  Any suggestions, or a better method of checking who sent the message?
03-12-2011 01:39 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Origin and Messenger.MyName... - by whiz on 03-12-2011 at 01:39 PM
RE: Origin and Messenger.MyName... - by Mnjul on 03-12-2011 at 02:11 PM
RE: Origin and Messenger.MyName... - by matty on 03-12-2011 at 08:36 PM
RE: Origin and Messenger.MyName... - by foaly on 03-12-2011 at 08:47 PM
RE: Origin and Messenger.MyName... - by Matti on 03-12-2011 at 11:08 PM
RE: Origin and Messenger.MyName... - by matty on 03-13-2011 at 12:35 AM


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