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

Origin to email?
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Origin to email?
quote:
Originally posted by Deco
Thirdly this instead of getting the contacts from the chatwindow, gets the contacts from your contact list. Might be a little longer but it'll work when  you have more than one person in the chat window.

function GetContactEmail(Name) {
var Result = "";
var Contacts = Messenger.MyContacts;
    var e = new Enumerator(Contacts);
    for (;!e.atEnd();e.moveNext()) {
        var Contact = e.item();
        if(Contact.Name == Name) {
        Result = Contact.Email;
                }
    }
    return Result;
}
When you have more than one person in the chat window, simply use ChatWnd.Contacts. In fact you must use it anyways  anyhow and you must check for all (even if it is only 1) contacts like that.

Using the contactlist window contacts will:
a) make this unneeded longer
b) make the (though very remote) chance of getting a false positive much higher. Since two people can have the same name. The chance that two people have the same name is much larger in a larger list.
c) will fail if a contact is in the chat window which is not in your contact list (which is quite possible in multiple contact chats)

This post was edited on 09-22-2006 at 10:56 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-22-2006 10:54 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Origin to email? - by Robin4286 on 09-16-2006 at 02:46 AM
RE: Origin to email? - by matty on 09-16-2006 at 03:41 AM
RE: Origin to email? - by Robin4286 on 09-16-2006 at 03:57 AM
RE: Origin to email? - by cloudhunter on 09-16-2006 at 03:59 AM
RE: Origin to email? - by CookieRevised on 09-16-2006 at 04:32 AM
RE: Origin to email? - by markee on 09-16-2006 at 07:27 AM
RE: Origin to email? - by Robin4286 on 09-16-2006 at 06:25 PM
RE: Origin to email? - by R4000 on 09-16-2006 at 06:34 PM
RE: Origin to email? - by CookieRevised on 09-16-2006 at 10:50 PM
RE: Origin to email? - by markee on 09-22-2006 at 06:07 AM
RE: Origin to email? - by Deco on 09-22-2006 at 09:59 PM
RE: RE: Origin to email? - by CookieRevised on 09-22-2006 at 10:54 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