What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need contact to the creator of MSN Online Time

Need contact to the creator of MSN Online Time
Author: Message:
babar-mughal
New Member
*


Posts: 2
Joined: Jul 2006
Wink  Changed the script just a 'little' bit
Hi mate!

I really liked your script, and its running now 'all' the time ... :)
anyway, one of my mate while chatting to me told me that she was getting annoyed because of the script updating it self every sec, so I changed it a bit, removed second wise display updates. i haven't asked anyone to see if its work out better now. but i am putting the edited script here,  so other people can try it and see if it works in lesser updates sent out ... :)
cheerios to everyone doing a good [or bad] job .. :p

////////////////////////////SCRIPT//////////////////////////////////


var Sec = 0;
var Min = 0;
var Hrs = 0;
var Days = 0;
var Weeks = 0;

function OnEvent_Signin(Email)
{
    RegUserPath = (MsgPlus.ScriptRegPath).replace(/GlobalSettings/, Email) + '\\';
    MsgPlus.AddTimer("Time",1000);
    var lang = readreg('lang');
    if (lang == '') {
        writereg('lang', 'English', 'str');
    }
}

function OnEvent_Timer(sTimerId)
{
    if (sTimerId == "Time") {   
       
        if (Sec == "60") {
            Sec = 0;
            Min = Min + 1;
        }
        if (Min == "60") {
            Hrs = Hrs + 1;
            Min = 0;
        }
        if (Hrs == "24") {
            Hrs = 0;
            Days = Days + 1;
        }
        if (Days == "7") {
            Days = 0;
            Weeks = Weeks + 1
        }
       
        //Language Options
        var lang = readreg('lang');
        if (lang == 'English') {
            var OnlineTime = "Online Time: " + Min + " Minutes " + Hrs + " Hours " + Days + " Days";
        }
       
        if (lang == 'Spanish') {
            var OnlineTime = "Tiempo que Tengo Conectado: " + Min + " Minutos " + Hrs + " Horas " + Days + " Dias";
        }
       
        Messenger.MyPersonalMessage = OnlineTime
        Debug.Trace(OnlineTime);
        Sec = Sec + 1;
        MsgPlus.AddTimer("Time",1000);
       
    }
}

function onGetScriptMenu(nLocation) {
var sMenu = '<ScriptMenu>';
sMenu += '<SubMenu Label="Language">Languages ';
sMenu += '<MenuEntry Id="English">English</MenuEntry>';
sMenu += '<MenuEntry Id="Spanish">Spanish</MenuEntry>';
sMenu += '</SubMenu>';
sMenu += '</ScriptMenu>';
return sMenu;
}

function onEvent_MenuClicked(sMenuId, nLocation, Wnd)
{
    if (sMenuId == 'English') {
        writereg('lang', 'English', 'str');
    }
    if (sMenuId == "Spanish") {
        writereg('lang', 'Spanish', 'str');
    }
}

//Functions taken from theRand i hope you dont mind i needed them for settings and i didnt know how to do them
function isreg(path) {
var reg, tmp;
    try {
    reg = new ActiveXObject("WScript.Shell");
    tmp = reg.RegRead(RegUserPath + path);
        if(tmp != "") return true;
    } catch(e) {
    return false;
    }
}

function readreg(path) {
if(!isreg(path)) return false;
var reg = new ActiveXObject("WScript.Shell");
return reg.RegRead(RegUserPath + path);
}

function writereg(path, val, type) {
var reg = new ActiveXObject("WScript.Shell");
    switch(type) {
    case 'num':
    return reg.RegWrite(RegUserPath + path, val, 'REG_DWORD');
    break;

    case 'str':
    return reg.RegWrite(RegUserPath + path, val, 'REG_SZ');
    break;
    }
}

07-31-2006 10:10 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need contact to the creator of MSN Online Time - by amazon on 07-30-2006 at 05:45 PM
RE: Need contact to the creator of MSN Online Time - by Sunshine on 07-30-2006 at 05:59 PM
RE: Need contact to the creator of MSN Online Time - by amazon on 07-30-2006 at 08:01 PM
RE: Need contact to the creator of MSN Online Time - by Menthix on 07-30-2006 at 09:34 PM
RE: Need contact to the creator of MSN Online Time - by Chrono on 07-30-2006 at 09:36 PM
RE: Need contact to the creator of MSN Online Time - by M73A on 07-30-2006 at 09:57 PM
RE: Need contact to the creator of MSN Online Time - by Menthix on 07-30-2006 at 10:01 PM
RE: Need contact to the creator of MSN Online Time - by amazon on 07-30-2006 at 11:02 PM
Changed the script just a 'little' bit - by babar-mughal on 07-31-2006 at 10:10 PM
RE: RE: Need contact to the creator of MSN Online Time - by babar-mughal on 07-31-2006 at 10:13 PM
Translation French for Online Time - by thymotep on 08-17-2006 at 11:18 AM


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