What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help with sendmsg i think

help with sendmsg i think
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: help with sendmsg i think
Javascript code:
var oChats = {};
 
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
    oChats[pChatWnd.Handle] = sMessage;
}
 
function OnEvent_ChatWndDestroyed(pChatWnd) {
    delete oChats[pChatWnd.Handle];
}
 
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nKind) {
    if (typeof oChats[pChatWnd.Handle] === 'object'
        && oChats[pChatWnd.Handle] === sMessage) {
        // we sent the message
        delete oChats[pChatWnd.Handle];
    } else {
        if (!pChatWnd.EditChangeAllowed) return sMessage; // we cannot send a message for whatever reason
 
        switch (sMessage) {
            case '!server':
                pChatWnd.SendMessage('');
                break;
            case '!site':
                pChatWnd.SendMessage('');                
                break;
        }
    }
}


This post was edited on 08-02-2010 at 05:50 PM by matty.
08-02-2010 05:49 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help with sendmsg i think - by gtakiller on 08-02-2010 at 04:39 PM
RE: help with sendmsg i think - by matty on 08-02-2010 at 05:49 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