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:
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: Origin and Messenger.MyName...
quote:
Originally posted by matty
Would look something like this:

js code:
var oChats = {};

function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
    oChats[pChatWnd.Handle] = sMessage;
}

function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nKind) {
    if (oChats[pChatWnd.Handle] === sMessage) {
        // Looks like we sent the message
        // Do whatever it is we need to do
        OnEvent_ChatWndDestroyed(pChatWnd);
        return sMessage;
    }
   
    // Oh doesn't look like we sent the message
    // so do whatever it is we need to do
}

function OnEvent_ChatWndDestroyed(pChatWnd) {
    delete oChats[pChatWnd.Handle];
}


Shouldn't you return sMessage anyway?
Now you only do it when you sent the message yourself....
[signature.jpg]
03-12-2011 08:47 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