What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Getting all my contacts

Getting all my contacts
Author: Message:
Riko15
New Member
*


Posts: 6
28 / Male / Flag
Joined: May 2010
O.P. Huh?  Getting all my contacts
Hi,

I'm just new, and started with scripting Plus! yesterday.
I'm kinda stuck on something..

How can I show in my Debug window, who all my contacts emails are?
Thnx!

- If possible, I want the contacts to be seperated by comma's. -

This post was edited on 05-09-2010 at 12:41 PM by Riko15.
05-09-2010 12:40 PM
Profile PM Web Find Quote Report
Riko15
New Member
*


Posts: 6
28 / Male / Flag
Joined: May 2010
O.P. RE: Getting all my contacts
Nobody? o,o
05-09-2010 06:45 PM
Profile PM Web Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: Getting all my contacts
You need to enumerate the contact list like this.
js code:
var enum = new Enumerator(Messenger.MyContacts);
var contacts = new Array();
for (; !enum.atEnd(); enum.moveNext())
{
    contacts.push(enum.item().Email);
}
Debug.Trace(contacts.join(", "));
05-09-2010 06:48 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Getting all my contacts
You don't need to use the join method on the array as tracing it will output a comma separated list of values...

js code:
var contacts = new Array();
for (var enum = new Enumerator(Messenger.MyContacts); !enum.atEnd(); enum.moveNext()){
    contacts.push(enum.item().Email);
}
Debug.Trace(contacts);

EDIT: Riko15, this is not a chat room or an instant messaging service. As such people may take a while to reply. Please have a little more patience.

This post was edited on 05-09-2010 at 07:13 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
05-09-2010 07:13 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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