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