What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! Help » Time Elapsed Away.

Time Elapsed Away.
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Time Elapsed Away.
PS: this is a simple script which simply adds the tags (!PS_E), (!PS_ES), (!PS_EM) and (!PS_EH) back so they can be used in an auto-response message (and chat text).

js code:
var DateTimeSet = new Date();
var bPersonalStatus = false;

function OnEvent_EnterPersonalizedStatus(eNewStatus, sNameTag, sPersonalMessage, sAutoMessage) {
    bPersonalStatus = true;
    DateTimeSet = new Date();
}

function OnEvent_LeavePersonalizedStatus() {
    bPersonalStatus = false;
}

function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
    // Let's only look for the tag when we are in a personalised status
    if (bPersonalStatus) {
        var secs = Math.floor((new Date().getTime() - DateTimeSet.getTime()) / 1000);
        var hours = Math.floor(secs / 3600);
        secs -= hours * 3600;
        var mins = Math.floor(secs / 60);
        secs -= mins * 60;
        sMessage = sMessage.replace(/\(\!PS_E\)/g,((hours>9)?hours:'0'+hours) + ':' + ((mins>9)?mins:'0'+mins) + ':' + ((secs>9)?secs:'0'+secs));
        sMessage = sMessage.replace(/\(\!PS_ES\)/g,secs);
        sMessage = sMessage.replace(/\(\!PS_EM\)/g,mins);
        sMessage = sMessage.replace(/\(\!PS_EH\)/g,hours);
    }
    return sMessage
}

PS: a more elaborate script is attached. It also adds (!S_E), (!S_ES) , (!S_EM) , (!S_EH) tags which will show the elapsed time since the last status change. Thus, independant of the personalised status. Therefor they also work when you are not in a personalised status.

.plsc File Attachment: psetag.plsc (1.47 KB)
This file has been downloaded 126 time(s).

This post was edited on 11-21-2009 at 10:48 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-20-2009 03:38 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Time Elapsed Away. - by sibecg on 11-19-2009 at 10:56 AM
RE: Time Elapsed Away. - by Spunky on 11-19-2009 at 01:30 PM
RE: Time Elapsed Away. - by CookieRevised on 11-20-2009 at 02:43 PM
RE: Time Elapsed Away. - by Spunky on 11-20-2009 at 03:23 PM
RE: Time Elapsed Away. - by CookieRevised on 11-20-2009 at 03:38 PM
RE: Time Elapsed Away. - by Spunky on 11-20-2009 at 03:50 PM
RE: Time Elapsed Away. - by CookieRevised on 11-20-2009 at 04:09 PM
RE: Time Elapsed Away. - by sibecg on 11-20-2009 at 10:17 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