Shoutbox

Close windows when logged out - 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: Close windows when logged out (/showthread.php?tid=93638)

Close windows when logged out by Vilkku on 01-22-2010 at 06:03 PM

Is it possible to make a script close all chat windows when you are logged out of messenger? When you log in on another computer, you are logged out but the windows remain open, which is annoying (I store all my logs in my dropbox, and this causes conflicting copies, as the file is open at two locations).

Cheers.


RE: Close windows when logged out by matty on 01-22-2010 at 06:44 PM

Javascript code:
function OnEvent_SignOut() {
    for (var oChatWnd = new Enumerator(Messenger.CurrentChats); !oChatWnd.atEnd(); oChatWnd.moveNext()) {
        Interop.Call('user32', 'SendMessageW', oChatWnd.item().Handle, 0x10 /*WM_CLOSE*/, 0, 0);
    }
}


RE: Close windows when logged out by Vilkku on 01-22-2010 at 07:22 PM

Thanks