matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: 1 hour interval, who's online
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('contact counter', '·$3contacts online : '+online+'·$0', '' , '' ,'', '');
MsgPlus.DisplayToastContact('contact 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
}
}
This post was edited on 08-06-2006 at 03:12 PM by matty.
|
|