What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » 1 hour interval, who's online

Pages: (2): « First [ 1 ] 2 » Last »
1 hour interval, who's online
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. 1 hour interval, who's online
alexp2_ad recently made this code for me so it would show how many people were online when i signed into msn

Is it possible for someone to edit the code below so that every 30mins or 1hour or something, it showed a toast with xx contacts are online and xx contacts are offline.

Is it possible to make the time ie 30 mins, 1hr etc a variable so there is someway of customizing it.

Thanks

134jimbodude




code:
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',online+' contacts are online',offline+' contacts are offline');
}

08-06-2006 02:32 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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('Online',online+' contacts are online',offline+' contacts are offline');
    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-06-2006 02:43 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
thanks

What would it be for 5 mins,10 mins, 15 mins etc or how would i work it out?
08-06-2006 02:45 PM
Profile E-Mail PM Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
RE: 1 hour interval, who's online
quote:
Originally posted by 134jimbodude
What would it be for 5 mins,10 mins, 15 mins etc or how would i work it out?

It's done in seconds. So for 5 mins just times 60 by 5.

Edit: Then add 3 0's by the looks of it on the end :P.

This post was edited on 08-06-2006 at 02:48 PM by absorbation.
08-06-2006 02:47 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
oh thanks
08-06-2006 02:47 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: 1 hour interval, who's online
1000 is 1 second.
08-06-2006 02:50 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
ok thanks so much matty
08-06-2006 02:50 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
How would i make 'contacts are online' green

and how would i make 'contacts are offline' red

thanks
08-06-2006 02:57 PM
Profile E-Mail PM Find Quote Report
Veggie
Full Member
***

Avatar

Posts: 415
Reputation: 21
37 / Male / Flag
Joined: Sep 2004
RE: 1 hour interval, who's online
cant you try yourself even a little bit?
MsgPlus.DisplayToastContact
Supports plus formatting codes.
08-06-2006 03:03 PM
Profile E-Mail PM Web Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
i am sorry but i am useless at this sort of stuff
please help me out someone
08-06-2006 03:03 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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