What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Api Send Message

Api Send Message
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Api Send Message
js code:
var oChatWnds = {};

function OnEvent_ChatWndCreated(oChatWnd) {
    if (oChatWnd.Contacts.Count !== 1) return;
    for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
        if (oContact.item().Blocked === true) {
            var tChatWnd = Messenger.OpenChat(oContact.item().Email.replace('@', '')+'@xXDarknessxx.chat.com')
            oChatWnds[tChatWnd.Handle] = {};
                oChatWnds[tChatWnd.Handle].ChatWnd = tChatWnd;
                oChatWnds[tChatWnd.Handle].Email = oContact.item().Email;
            Interop.Call('user32', 'SendMessageW', oChatWnd.Handle, 0x10 /* WM_CLOSE */,0,0);
        }
    }
}

function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
    if (oChatWnd.Contacts.Count !== 1) return;
    for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
        if (oContact.item().Email.indexOf('@xXDarknessxx.chat.com') !== -1) {
            oContact.item().Blocked = false;
            var tChatWnd = Messenger.OpenChat(oChatWnds[oChatWnd.Handle].Email)
            tChatWnd.SendMessage(sMessage)
            oContact.item().Blocked = true;
        }
    }
}

function OnEvent_ChatWndDestroyed(oChatWnd) {
    delete oChatWnds[oChatWnd.Handle];
}

Something along those lines:
04-28-2009 05:26 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Api Send Message - by xXDarknessXx on 04-28-2009 at 04:57 PM
RE: Api Send Message - by matty on 04-28-2009 at 05:26 PM
RE: Api Send Message - by xXDarknessXx on 04-28-2009 at 05:54 PM
RE: Api Send Message - by matty on 04-28-2009 at 06:03 PM
RE: Api Send Message - by xXDarknessXx on 04-28-2009 at 06:14 PM
RE: Api Send Message - by Mnjul on 04-28-2009 at 06:14 PM
RE: Api Send Message - by matty on 04-28-2009 at 06:28 PM
RE: Api Send Message - by CookieRevised on 04-28-2009 at 10:31 PM
RE: Api Send Message - by xXDarknessXx on 04-29-2009 at 12:49 PM
RE: Api Send Message - by matty on 04-29-2009 at 01:21 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