Shoutbox

Get contact numbers - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Get contact numbers (/showthread.php?tid=85734)

Get contact numbers by Leydorn on 09-02-2008 at 05:13 PM

Hello everybody,

I have a problem with a script showing contact numbers, as it's showing less contacts than I really have.

The part of the script is :

function getContacts()
{
    var contacts = Messenger.MyContacts;
    var online = 0;
    var offline = 0;
    var c;
    for(var enume = new Enumerator(contacts);!enume.atEnd();enume.moveNext()){
        c = enume.item();
        if(c.Status != 1){
            online++;
        }
        else {
            offline++;
        }
    }

    if(DEFAULT_USERS == 2) {
    return online + ' En ligne | ' + offline;
    }
    else {
    return online;
   
    }

Is there anything to change?

Thanks ;)
(the entire script also indicates the total RAM and the RAM used, and the time since the computer has started)


RE: Get contact numbers by Spunky on 09-02-2008 at 07:21 PM

The problem won't be with your script, but rather with the contact's cache. Search for posts on how to clear it on this forum and it should work


RE: Get contact numbers by Leydorn on 09-02-2008 at 08:44 PM

Thanks, it (deleting contact files in the Documents and Settings/Contacts folder) worked for the online contacts, but not for the offline ones (it shows 355 instead of 918, and it started with 400).