Shoutbox

Online contacts - 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: Online contacts (/showthread.php?tid=65317)

Online contacts by Jimbo on 08-24-2006 at 09:57 AM

A while ago, this code was made for me so it showed how many contacts i had offline and online every 30 or 60 mins.

can someone edit it so it shows me every 5 mins.

code:
var ThirtyMins = 1800000;
var SixtyMins = 3600000;

function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Online contacts counter', '·$3Contacts online : '+online+'·$0', '' , '' ,'', '');
MsgPlus.DisplayToastContact('Offline contacts counter', '·$4Contacts offline : '+offline+'·$0', '' , '' ,'', '');
MsgPlus.AddTimer('reload', ThirtyMins) //Repalce with SixtyMins if you want an hour
}

function OnEvent_Timer(sTimerId){
if (sTimerId == 'reload'){
OnEvent_SigninReady(Messenger.MyEmail); //Simply call the function so you dont duplicate code
}
}


RE: Online contacts by NanaFreak on 08-24-2006 at 10:01 AM

here it is :P it was easy

code:
var ThirtyMins = 1800000;
var SixtyMins = 3600000;
var FiveMins = 300000;

function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Online contacts counter', '·$3Contacts online : '+online+'·$0', '' , '' ,'', '');
MsgPlus.DisplayToastContact('Offline contacts counter', '·$4Contacts offline : '+offline+'·$0', '' , '' ,'', '');
MsgPlus.AddTimer('reload', FiveMins) //Repalce with SixtyMins if you want an hour
}

function OnEvent_Timer(sTimerId){
if (sTimerId == 'reload'){
OnEvent_SigninReady(Messenger.MyEmail); //Simply call the function so you dont duplicate code
}
}


Edit:
quote:
Originally posted by saralk
edit: beaten to it (Smilie)
yay my first time beating someone
RE: Online contacts by saralk on 08-24-2006 at 10:02 AM

code:
var ThirtyMins = 1800000;
var SixtyMins = 3600000;
var FiveMins = 300000;

function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Online contacts counter', '·$3Contacts online : '+online+'·$0', '' , '' ,'', '');
MsgPlus.DisplayToastContact('Offline contacts counter', '·$4Contacts offline : '+offline+'·$0', '' , '' ,'', '');
MsgPlus.AddTimer('reload', FiveMins) //Repalce with SixtyMins if you want an hour
}

function OnEvent_Timer(sTimerId){
if (sTimerId == 'reload'){
OnEvent_SigninReady(Messenger.MyEmail); //Simply call the function so you dont duplicate code
}
}

edit: beaten to it :(
RE: Online contacts by Jimbo on 08-24-2006 at 10:02 AM

thanks