What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » send message withouth knowing windowhandle?

send message withouth knowing windowhandle?
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
41 / Male / Flag
Joined: Aug 2006
RE: send message withouth knowing windowhandle?
Well to send message to a contact knowing his email...

1) Iterate the contact list object
2) Match the email you want with the contact's object
3) Use the OpenChat function sending the contact you found
4) Check if the chat window was opened
5) Send your message with the SendMessage function.

code:
var strEmail = "email@email.com";
var strMsg = "msg you want to send";
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext())
{
    var Contact = e.item();
                if (Contact.Email == strEmail) {
                    var ChatWnd = Messenger.OpenChat(Contact);
                    if(ChatWnd != "null") {
                       ChatWnd.SendMessage(strMsg);
                    } else {
                        //actions in case it could not open the chat
                    }
}

}


I wrote this from the top of my head so I might have missed something. I'm sure someone will correct me if I'm wrong or if there's a better method. Didn't test the code. But I'm sure this will give you a clue on which direction to go. Have fun!

07-23-2007 01:24 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
send message withouth knowing windowhandle? - by runarius on 07-23-2007 at 01:01 AM
RE: send message withouth knowing windowhandle? - by Deco on 07-23-2007 at 01:24 AM
RE: send message withouth knowing windowhandle? - by runarius on 07-23-2007 at 02:32 AM
RE: send message withouth knowing windowhandle? - by CookieRevised on 07-23-2007 at 02:46 AM
RE: send message withouth knowing windowhandle? - by runarius on 07-23-2007 at 03:06 AM
RE: send message withouth knowing windowhandle? - by matty on 07-23-2007 at 05:16 PM
RE: send message withouth knowing windowhandle? - by mistertech on 07-25-2007 at 05:06 AM
RE: send message withouth knowing windowhandle? - by CookieRevised on 07-25-2007 at 06:16 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