Are you sure ??? Verify your copy-paste (lol) xD
Sorry for very long posts
code:
shell=new ActiveXObject("WScript.Shell");
function OnEvent_Initialize(MessengerStart) {
if (MessengerStart==false) {
regPath=MsgPlus.ScriptRegPath+Messenger.MyUserId+'\\';
Initialize();
}
}
function OnEvent_Signin(Email) {
regPath=MsgPlus.ScriptRegPath+Messenger.MyUserId+'\\';
Initialize();
}
function OnEvent_Signout(Email) {
MsgPlus.CancelTimer("Timer");
}
function OnEvent_Uninitialize(MessengerExit) {
MsgPlus.CancelTimer("Timer");
}
function OnEvent_Timer(TimerId) {
seconds+=10
shell.RegWrite(regPath+"Seconds",seconds);
yr=Math.floor(seconds/31536000);
mon=Math.floor((seconds-(yr*31536000))/2592000);
day=Math.floor((seconds-((yr*31536000)+(mon*2592000)))/86400);
hr=Math.floor((seconds-((yr*31536000)+(mon*2592000)+(day*86400)))/3600);
min=Math.floor((seconds-((yr*31536000)+(mon*2592000)+(day*86400)+(hr*3600)))/60);
secs=Math.floor((seconds-((yr*31536000)+(mon*2592000)+(day*86400)+(hr*3600)+(min*60))));
if (secs>0) {SECONDS=" "+secs+" seconds";}
else {SECONDS="";}
if (min==1) {MINS=" "+min+" minute";}
else if (min>1) {MINS=" "+min+" minutes";}
else {MINS="";}
if (secs!=0&&min>0) {MINS+=" and";}
if (hr==1) {HRS=" "+hr+" hour";}
else if (hr>1) {HRS=" "+hr+" hours";}
else {HRS="";}
if (day==1) {DAYS=" "+day+" day";}
if (day>1) {DAYS=" "+day+" days";}
else {DAYS="";}
if (mon==1) {MONTH=" "+mon+" month";}
else if (mon>1) {MONTH=" "+mon+" months";}
else {MONTH="";}
if (yr==1) {YEAR=" "+yr+" year";}
if (yr>1) {YEAR=" "+yr+" years";}
else {YEAR="";}
MsgPlus.AddTimer("Timer",10000);
Messenger.MyPersonalMessage="I've been connected for"+YEAR+MONTH+DAYS+HRS+MINS+SECONDS;
}
function Initialize() {
try {seconds = parseInt(shell.RegRead(regPath+"Seconds"));} catch(err) {seconds=0;}
MsgPlus.AddTimer("Timer",10000);
}
I verified this script, and, for me, there is no problem...
