Shoutbox

Time Elapsed Away. - 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: WLM Plus! Help (/forumdisplay.php?fid=12)
+----- Thread: Time Elapsed Away. (/showthread.php?tid=92963)

Time Elapsed Away. by sibecg on 11-19-2009 at 10:56 AM

Hi there.

Didn't there used to be an option on the auto responder to let people know how long had elapsed since you went away?

I am sure a few years back I used to use a feature like this on messenger plus.

It was something that you could use on it is own or with the remaining time away responder.

If anyone can advise if there is a way I would be grateful.

Thanks.


RE: Time Elapsed Away. by Spunky on 11-19-2009 at 01:30 PM

I'm sure there was somewhere, although it may be another 3rd party app.

If not I would definitely write a script for this as it is kinda useful


RE: Time Elapsed Away. by CookieRevised on 11-20-2009 at 02:43 PM

There are no tags which you could use to show how much time was elapsed since you went away. (!PS_E) doesn't work anymore.

But, there are tags which you could use to show you the remaining time though.

The only difference between the current version and how it was in Plus!1 to Plus!3 is that you now need to specify the amount of time the personalised away status will be used (thus in how many minutes you will return). In Plus!1 to Plus!3 you had to specify the exact time when you will return.

Anyways, the tags to show the remaining time still exist and can still be used:

(!PS_R) remaining time
(!PS_RH) remaining hours
(!PS_RM) remaining minutes
(!PS_RS) remaining seconds

The suggestion to re-add (!PS_E) (elapsed time) is very old though: "CookieRevised's reply to [Request] Fast & Simple Away/Busy System :)".

quote:
Originally posted by Spunky
If not I would definitely write a script for this as it is kinda useful
Don't forget about your old script, see link above ;)
RE: Time Elapsed Away. by Spunky on 11-20-2009 at 03:23 PM

Wow, I forgot about that (It is over 3 years old though :p). I was terrible at scripting back then lol. Although you did provide an improved version in the end :)

I'll start work on it again to add support for the !PS_E tags to PSM and chat messages.


RE: Time Elapsed Away. by CookieRevised on 11-20-2009 at 03:38 PM

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.
RE: Time Elapsed Away. by Spunky on 11-20-2009 at 03:50 PM

quote:
Originally posted by CookieRevised
this is a simple script which simply adds the tags

Spoil all my fun then >.<

(l)
RE: Time Elapsed Away. by CookieRevised on 11-20-2009 at 04:09 PM

quote:
Originally posted by Spunky
quote:
Originally posted by CookieRevised
this is a simple script which simply adds the tags

Spoil all my fun then >.<

(l)
:P

But it was already 75% written when I wrote my first reply in this thread (wasn't packed in a PLSC file though).

Anyways, I have no intentions at all to add support for the personalised message or other things which you suggested. So, if you want that, you can always create a new script. Or use an existing one (which can use similar tags) like the CountDown Live script.

;)
RE: Time Elapsed Away. by sibecg on 11-20-2009 at 10:17 PM

Thanks for the help guys :D