What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Contact.Name = 1?

Contact.Name = 1?
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. Contact.Name = 1?
I'm working on a script and need to put names into a list view box. I want an option to only display online contacts. So I created this code:
quote:
function populateContacts(who){
    Debug.Trace(who);
        for(i = pollWindow.LstView_GetCount('List1');i>=0;i--){
            pollWindow.LstView_RemoveItem("List1",i);
        }
    i=0;
    var Contacts = Messenger.MyContacts;
    var e = new Enumerator(Contacts);
    for(; !e.atEnd(); e.moveNext()) {
    var Contact = e.item();
            if(who==="all"){
                pollWindow.LstView_AddItem("List1",Contact.Email,i);
                pollWindow.LstView_SetItemText("List1",i,1,Contact.Name);
                i++;
            }else if(who==="online"&&Contact.Status>2){
                    pollWindow.LstView_AddItem("List1",Contact.Email,i);
                    pollWindow.LstView_SetItemText("List1",i,1,Contact.Name);
                    if(pollWindow.LstView_GetItemText("List1",i,1)==="1")Debug.Trace("error: "+i+": "+Contact.Name);
                    i++;
            }
    }
        pollWindow.SetControlText("lbl_num","0 / "+i+" Contacts Selected");
}

My problem is that certain contacts ALWAYS have the name shown as "1" and I don't understand why. I though it might be a script problem, but I've seen signout message saying "1 has signed out".

It always happens when i = one of these numbers:

0
2
3
4
8
10
11
12

Can someone please tell me if it's a script error or something dodgy with my Messenger Plus! please?

PS: Would have indented, but still looks wierd and just as hard to read
<Eljay> "Problems encountered: shit blew up" :zippy:
10-22-2006 01:45 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Contact.Name = 1? - by Spunky on 10-22-2006 at 01:45 PM
RE: Contact.Name = 1? - by Felu on 10-22-2006 at 01:50 PM
RE: Contact.Name = 1? - by Spunky on 10-22-2006 at 02:11 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