What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Close windows when logged out

Close windows when logged out
Author: Message:
Vilkku
Veteran Member
*****

Avatar

Posts: 1411
Reputation: 27
35 / Male / Flag
Joined: Mar 2003
O.P. Close windows when logged out
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.
[Image: signature.php]
01-22-2010 06:03 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Close windows when logged out
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);
    }
}


This post was edited on 01-22-2010 at 06:45 PM by matty.
01-22-2010 06:44 PM
Profile E-Mail PM Find Quote Report
Vilkku
Veteran Member
*****

Avatar

Posts: 1411
Reputation: 27
35 / Male / Flag
Joined: Mar 2003
O.P. RE: Close windows when logged out
Thanks
[Image: signature.php]
01-22-2010 07:22 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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