1 hour interval, who's online |
Author: |
Message: |
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
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 |
|
|
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.
|
|
08-06-2006 03:11 PM |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
Joined: Jul 2006
|
O.P. RE: 1 hour interval, who's online
thanks again
|
|
08-06-2006 03:13 PM |
|
|
Lukeyy19
Junior Member
Oh Holy One...
Posts: 46
35 / / –
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.
|
|
08-06-2006 03:14 PM |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
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
Attachment: Who's online.plsc (1.26 KB)
This file has been downloaded 178 time(s).
|
|
08-06-2006 03:23 PM |
|
|
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 |
|
|
alexp2_ad
Scripting Contest Winner
Who love the chocolate?
Posts: 691 Reputation: 26
37 / / –
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.
Attachment: Who's online.plsc (1.1 KB)
This file has been downloaded 185 time(s).
This post was edited on 08-06-2006 at 09:27 PM by alexp2_ad.
|
|
08-06-2006 09:23 PM |
|
|
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 |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
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 |
|
|
Pages: (2):
« First
«
1
[ 2 ]
Last »
|
|