What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Online contacts

Online contacts
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. Online contacts
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
}
}

08-24-2006 09:57 AM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Online contacts
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

This post was edited on 08-24-2006 at 10:04 AM by NanaFreak.
08-24-2006 10:01 AM
Profile PM Find Quote Report
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
34 / Male / Flag
Joined: Feb 2003
RE: Online contacts
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 :(

This post was edited on 08-24-2006 at 10:02 AM by saralk.
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
08-24-2006 10:02 AM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: Online contacts
thanks
08-24-2006 10:02 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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