What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Online time

Online time
Author: Message:
KnRd_WC
Junior Member
**

Avatar
Florian PAQUET

Posts: 74
Reputation: 1
35 / Male / Flag
Joined: Aug 2006
RE: Online time
Hi Err0r, sorry, but I thinked that somebody else will answer before me.... :S

I made a script, because I don't want to modify another script :
Go to the MP!L options, "General">"Scripts">"New". Remove everything in the new window, and copy-paste this code. (I think my script works fine....)

code:
function OnEvent_Initialize(MessengerStart) {
    shell=new ActiveXObject("WScript.Shell");
    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_Timer(TimerId) {
    seconds+=10
    shell.RegWrite(regPath+"Seconds",seconds);
   
    yr=parseInt(seconds/31536000);
    mon=parseInt((seconds-(yr*31536000))/2592000);
    day=parseInt((seconds-(yr*31536000)-(mon*2592000))/86400);
    hr=parseInt((seconds-(yr*31536000)-(mon*2592000)-(day*86400))/3600);
    min=parseInt((seconds-(yr*31536000)-(mon*2592000)-(day*86400)-(hr*3600))/60);
    secs=parseInt((seconds-(yr*31536000)-(mon*2592000)-(day*86400)-(hr*3600)-(min*60)));
   
    if (secs>0) {SECONDS=secs+" secondes ";}
    else {SECONDS="";}
    if (min>0) {MINS=min+" minutes ";
        if (secs!=0) {
            MINS+="et "
        }
    }
    else {MINS="";}
    if (hr>0) {HRS=hr+" heures ";}
    else {HRS="";}
    if (day>0) {DAYS=day+" jours ";}
    else {DAYS="";}
    if (mon>0) {MONTH=mon+" mois ";}
    else {MONTH="";}
    if (yr>0) {YEAR=yr+" an ";}
    else {YEAR="";}
    MsgPlus.AddTimer("Timer",10000);
    Messenger.MyPersonalMessage="Cela fait "+YEAR+MONTH+DAYS+HRS+MINS+SECONDS+"que je suis en ligne depuis le 24 Août 2006"; // Here you can modify your message
}

function Initialize() {
    try {seconds = parseInt(shell.RegRead(regPath+"Seconds"));} catch(err) {seconds=0;}
    MsgPlus.AddTimer("Timer",10000);
}


This post was edited on 08-24-2006 at 12:24 PM by KnRd_WC.
08-24-2006 12:20 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Online time - by Err0r on 08-23-2006 at 05:53 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 12:20 PM
RE: Online time - by Kenji on 08-24-2006 at 12:26 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 12:28 PM
RE: Online time - by NiteMare on 08-24-2006 at 01:17 PM
RE: Online time - by Err0r on 08-24-2006 at 01:37 PM
RE: Online time - by skyserpent on 08-24-2006 at 01:48 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 04:18 PM
RE: Online time - by skyserpent on 08-24-2006 at 04:24 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 04:44 PM
RE: Online time - by skyserpent on 08-24-2006 at 04:49 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 05:03 PM
RE: Online time - by skyserpent on 08-24-2006 at 05:18 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 05:21 PM
RE: Online time - by skyserpent on 08-24-2006 at 05:23 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 05:29 PM
RE: Online time - by skyserpent on 08-24-2006 at 05:30 PM
RE: Online time - by Err0r on 08-24-2006 at 06:22 PM
RE: Online time - by KnRd_WC on 08-24-2006 at 06:29 PM


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