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
31 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
someone just told me that it supports plus formatting codes like [c=46] but i cant seem to get it to work


it is possible?
08-06-2006 03:05 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('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.
08-06-2006 03:11 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
thanks again
08-06-2006 03:13 PM
Profile E-Mail PM Find Quote Report
Lukeyy19
Junior Member
**

Avatar
Oh Holy One...

Posts: 46
34 / Male / –
Joined: Jun 2006
RE: 1 hour interval, who's online
ok i got the online to be green but the offline does not come out red, i cannot work out why?

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('Who is Online?',online+'[c=9] Contacts are Online![/c]',offline+'[c=4] Contacts are Offline[/c]');
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
}
}


oh also i changed the toast title, as i didnt like the original

Edit: oh Matty already did it :(

This post was edited on 08-06-2006 at 03:16 PM by Lukeyy19.
[Image: lukeyy19sig2fh6.png]
08-06-2006 03:14 PM
Profile PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
i have packaged everything into a plsc file including the colours
thanks to matty for the code


.plsc File Attachment: Who's online.plsc (1.26 KB)
This file has been downloaded 161 time(s).
08-06-2006 03:23 PM
Profile E-Mail PM Find Quote Report
4penguino
Banned


Posts: 85
Reputation: -13
Joined: Jul 2006
RE: 1 hour interval, who's online
well i really need some thing like that but.....i go to import script and it says "an error occured during import" and ive tried loads of times but i dont work can i get help
08-06-2006 09:19 PM
Profile E-Mail PM Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
36 / Male / –
Joined: May 2004
Status: Away
RE: RE: 1 hour interval, who's online
quote:
Originally posted by 134jimbodude
thanks to matty for the code

Ouch.  Harsh considering it's mostly my code.  :(

It's far from complicated and didn't take me long, but still... *-)

EDIT:  And the script fails to import because of a bad scriptinfo file.

Attached a working one.

.plsc File Attachment: Who's online.plsc (1.1 KB)
This file has been downloaded 168 time(s).

This post was edited on 08-06-2006 at 09:27 PM by alexp2_ad.
08-06-2006 09:23 PM
Profile E-Mail PM Find Quote Report
4penguino
Banned


Posts: 85
Reputation: -13
Joined: Jul 2006
RE: 1 hour interval, who's online
thanks ill try that now
it works thanks mate

This post was edited on 08-06-2006 at 09:35 PM by 4penguino.
08-06-2006 09:29 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: 1 hour interval, who's online
really sorry alex

I forgot you gave me the main code

thanks a bunch for that again
08-07-2006 09:43 AM
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