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
Oh and I did some optimising too