Shoutbox

[Request] After disconnect, change status? - 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: [Request] After disconnect, change status? (/showthread.php?tid=82593)

[Request] After disconnect, change status? by Chris4 on 03-23-2008 at 07:18 PM

When I usually sign-in, I sign in as offline. After that I go online.

Then, if my wireless was to suddenly disconnect me for a few seconds (which it sometimes does), Messenger would reconnect after a few seconds and I would sign back in as my default of offline; but the problem is that usually I don't even notice I've been disconnected and I end up being offline for half an hour without realising.

Is it possible to have a script that, if I reconnect to Messenger, it changes my status to online?


RE: [Request] After disconnect, change status? by toddy on 03-23-2008 at 07:19 PM

'remember my status' (irc) if the script is still around

or just sign-in online

edit:
http://www.msgpluslive.net/scripts/view/24-Remember-Status/ altho it does change the status before you sign in now, so if you lose connection as busy you'll always sign back in as busy. rather then just the once, then going back to sign in offline

for more info see [REQUEST] Remember Status


RE: [Request] After disconnect, change status? by Chris4 on 03-24-2008 at 06:13 AM

I guess that could work. Thanks.


RE: [Request] After disconnect, change status? by CookieRevised on 03-24-2008 at 12:32 PM

Add this to my RememberStatus script to let it do exactly what you want:

code:
var MyUserId;
var MyStatus;

function OnEvent_Signin(Email) {
    if (MyUserId !== Messenger.MyUserId) {
        MyUserId = Messenger.MyUserId;
        MyStatus = Messenger.MyStatus;
    }
}

function OnEvent_Uninitialize(MessengerExit) {
    if (MessengerExit && MyUserId != null) {
        try {
            new ActiveXObject("WScript.Shell").RegWrite(
                "HKEY_CURRENT_USER\\Software\\Microsoft\\MSNMessenger\\PerPassportSettings\\" + MyUserId + "\\DefaultSignInState",
                Array(6, 2, 10, 14, 18, 34, 50, 66)[MyStatus-2],
                "REG_DWORD"
            )
        } catch ( e ) {}
    }
}

If you add that code to the already existing code of the script, then the script will reset the status back to what it was the first time you've signed in when you actually exit Messenger. And it will still have the original behaviour of keeping the momentary status when you sign out/sign in.

It should still be polygamy safe and still be multi-user-friendly I think (I wrote this quickly without much testing and thinking).

But please don't redistribute the modified script. Keep it as a personal mod. This is just experimental.