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

Away since....
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Away since....
Something like this:
js code:
var LOCALE_USER_DEFAULT = 0x400;
var TIME_NOSECONDS = 0x2;

function OnEvent_MyStatusChange(nStatus) {
    var oStatus = { STATUS_ONLINE : 'Online',
                    STATUS_BUSY : 'Busy',
                    STATUS_AWAY : 'Away',
                    STATUS_IDLE : 'Idle',
                    STATUS_INCALL : 'On the phone',
                    STATUS_OUTLUNCH : 'Out to lunch'
                  }
    if (typeof oStatus[nStatus] === 'object') {
        var SYSTEMTIME = Interop.Allocate(16);
        var sTime = Interop.Allocate(512);
        var sDate = Interop.Allocate(512);
       
        Interop.Call('kernel32', 'GetSystemTime', SYSTEMTIME);
        Interop.Call('kernel32', 'GetTimeFormatW', LOCALE_USER_DEFAULT, TIME_NOSECONDS, SYSTEMTIME, 0, sTime, sTime.Size);
        Interop.Call('kernel32', 'GetDateFormatW', LOCALE_USER_DEFAULT, 0, SYSTEMTIME, 0, sDate, sDate.Size);
        Messenger.MyPersonalMessage = oStatus[nStatus]+ ' since '+sDate.ReadString(0) +' '+sTime.ReadString(0);
    }
}

This post was edited on 12-01-2009 at 03:22 PM by matty.
12-01-2009 03:21 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Away since.... - by sno on 12-01-2009 at 01:24 PM
RE: Away since.... - by Spunky on 12-01-2009 at 01:38 PM
RE: Away since.... - by matty on 12-01-2009 at 03:21 PM
RE: Away since.... - by Spunky on 12-01-2009 at 03:44 PM
RE: Away since.... - by sno on 12-01-2009 at 03:52 PM
RE: Away since.... - by matty on 12-01-2009 at 04:08 PM
RE: Away since.... - by sno on 12-01-2009 at 07:51 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