What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Contacts - Using the wrong status

[?] Contacts - Using the wrong status
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [?] Contacts - Using the wrong status
Also you may prefer to get the returned index from Wnd.LstView_AddItem rather than getting the count (which should be one less anyway I thought).  This should also increase speed marginally ;)

code:
var StatusImg = new Array('','Offline', 'Online'/*Current User*/, 'Online'/*Contact*/, 'Busy', 'Away', 'Away', 'Away', 'Busy', 'Away','Blocked',"Blocked-offline");

var e = new Enumerator(Messenger.MyContacts);
for(; !e.atEnd(); e.moveNext()) {
    var Contact = e.item();
    var index = Wnd.LstView_AddItem('contacts', Contact.Email, 0);
    Wnd.LstView_SetItemIcon('contacts', index, StatusImg[Contact.Status], true);
    if(Contact.Blocked==true) Wnd.LstView_SetItemIcon('contacts', index, StatusImg[(Contact.Status==1)?11:10)], true);
    Debug.Trace("Contact Status: "+Contact.Status+" | StatusImg["+Contact.Status+"] = '"+StatusImg[Contact.Status]+"'");
}

I think I told you about this just the other day 8-)

Oh and I did some optimising too :P

This post was edited on 10-06-2007 at 04:48 AM by markee.
[Image: markee.png]
10-06-2007 01:58 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Contacts - Using the wrong status - by Spunky on 10-05-2007 at 08:35 PM
RE: [?] Contacts - Using the wrong status - by vikke on 10-05-2007 at 08:48 PM
RE: [?] Contacts - Using the wrong status - by Spunky on 10-05-2007 at 10:47 PM
RE: RE: [?] Contacts - Using the wrong status - by vikke on 10-05-2007 at 11:02 PM
RE: [?] Contacts - Using the wrong status - by Chris4 on 10-05-2007 at 10:59 PM
RE: [?] Contacts - Using the wrong status - by Spunky on 10-05-2007 at 11:08 PM
RE: [?] Contacts - Using the wrong status - by phalanxii on 10-06-2007 at 01:13 AM
RE: [?] Contacts - Using the wrong status - by markee on 10-06-2007 at 01:58 AM
RE: [?] Contacts - Using the wrong status - by Spunky on 10-06-2007 at 05:19 PM
RE: [?] Contacts - Using the wrong status - by Chris4 on 10-07-2007 at 02:08 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