Shoutbox

Need a little bit of help. Time/Date - 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: Need a little bit of help. Time/Date (/showthread.php?tid=62909)

Need a little bit of help. Time/Date by Br4yd3nP.Plus on 07-09-2006 at 04:13 PM

var Message = "(Text Here) " + Messenger.MyName + "!";

Hello.

Is there somthing to replace MyName to show the time or date.

Brayden.


RE: Need a little bit of help. Time/Date by hmaster on 07-09-2006 at 04:19 PM

look at this piece of code, you should be able to figure it out :)

code:
var updatetime = 300;
var hours = null;
var minutes = null;
var seconds = null;
var textbtime = "(8) Me n U... ";
var textatime = ' :P';
var color1 = "#0A1C36";
var color2 = "#0080FF";

function OnEvent_Initialize(MessengerStart) {
Debug.Trace("----===[ Started Date n Time+ :) ]===----");
MsgPlus.AddTimer("time", updatetime);
}

function OnEvent_Signin(Email) {
the_time();
}

function the_time() {
var d = new Date();
if (d.getHours() < 10){
hours = "0" + d.getHours() + ":";
} else {
hours = d.getHours() + ":";
}

if (d.getMinutes() < 10){
minutes = "0" + d.getMinutes() + "/";
} else {
minutes = d.getMinutes() + "/";
}

if (d.getSeconds() < 10){
seconds = "0" + d.getSeconds();
} else {
seconds = d.getSeconds();
}
thetime = hours + minutes + seconds;
Debug.Trace("The time is: " + thetime);
Messenger.MyPersonalMessage = textbtime + thetime + textatime;
}

function OnEvent_Timer(sTimerId){
    if(sTimerId == "time"){
        the_time();
        MsgPlus.AddTimer("time", updatetime);
    }
}


Note: this changes only psm and shows the time. It also update per second, you may not want that.