Uptime and Idle Time Script wyh dont they work? >.< - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Uptime and Idle Time Script wyh dont they work? >.< (/showthread.php?tid=92035)
Uptime and Idle Time Script wyh dont they work? >.< by BlkChockr on 08-28-2009 at 06:06 PM
I tried to use this Uptime script (works when I cut out my own code) to make me an Idle and Online time Script...
But this doesnt seem to work... Either the Timer freezes or it doesnt even change my PSM
code: var s=0,m=0,h=0,d=0;
var is=0,im=0,ih=0,id=0;
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.DisplayToast("P.M. Time", "Displays uptime as personal message.");
MsgPlus.AddTimer("second", 1000);
if(id=="second")
{
s=s+1;
if (s==60)
{
s=0;
m=m+1;
}
if (m==60)
{
m=0;
h=h+1;
}
if (h==24)
{
h=0;
d=d+1;
}
if (m==0)
{
uptime="Online: " + s + " Seconds";
}
if (h==0)
{
uptime="Online: " + m + " Minutes, " + s + " Seconds";
}
if (d==0)
{
uptime="Online: " + h + " Hours, " + m + " Minutes, " + s + " Seconds";
}
if (d!=0)
{
uptime="Online: " + d + " Days, " + h + " Hours, " + m + " Minutes, " + s + " Seconds";
}
Messenger.MyPersonalMessage=uptime;
MsgPlus.AddTimer("second", 1000);
}
}
function OnEvent_MyStatusChange(NewStatus)
{
if( NewStatus == 6 || NewStatus == 7 )
{
MsgPlus.AddTimer("sekunde", 1000);
}
}
function OnEvent_Timer(bla)
{
if(bla=="sekunde")
{
is=is+1;
if (is==60)
{
is=0;
im=im+1;
}
if (im==60)
{
im=0;
ih=ih+1;
}
if (ih==24)
{
ih=0;
id=id+1;
}
if (im==0)
{
idletime="Idle: " + is + " Seconds";
}
if (ih==0)
{
idletime="Idle: " + im + " Minutes, " + is + " Seconds";
}
if (id==0)
{
idletime="Idle: " + ih + " Hours, " + im + " Minutes, " + is + " Seconds";
}
if (id!=0)
{
idletime="Idle: " + id + " Days, " + ih + " Hours, " + im + " Minutes, " + is + " Seconds";
}
Messenger.MyPersonalMessage=idletime;
MsgPlus.AddTimer("sekunde", 1000);
}
}
I hope you can help me
RE: Uptime and Idle Time Script wyh dont they work? >.< by vaccination on 08-29-2009 at 01:16 PM
Well, I suggest you read the posts in the thread you took the code from, specifically CookieRevised's reply to Uptime script, why doesn't it work?
RE: Uptime and Idle Time Script wyh dont they work? >.< by BlkChockr on 08-29-2009 at 11:03 PM
Hmm got I done now by modifying the existing Idle Time script...
|