What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Closing a chat window

Closing a chat window
Author: Message:
pinhead
New Member
*


Posts: 4
Joined: Mar 2008
O.P. Closing a chat window
Is it possible to close a normal chat window? I found OpenChat, but nothing to close this windows again..
And another question, but I don't think this is possible: Is there a way to reorganize the tabs in the chat window. Like exchanging positions of two tabs and alike?
03-30-2009 06:33 PM
Profile PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Closing a chat window
the first one is possible with ChatWndObj.close(0);

but sorry the second one is not possible... unless you close the windows and re-open them but thats not nice
03-30-2009 08:21 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Closing a chat window
quote:
Originally posted by NanaFreak
the first one is possible with ChatWndObj.close(0);

No, it's not? ^o)
<Eljay> "Problems encountered: shit blew up" :zippy:
03-30-2009 08:33 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Closing a chat window
You have to use the SendMessage API sending WM_CLOSE not ChatWndObj.Close(0);
03-30-2009 09:07 PM
Profile E-Mail PM Find Quote Report
afallenhope
New Member
*


Posts: 3
Joined: Apr 2009
RE: Closing a chat window
just a quick question, how exactly would you do this?
SendMessage(ChatWnd.handle, WM_CLOSE,0) but how do you use API in JS?  Forgive me for my ignorance, but I've been wondering how to do this for some time aswell.
04-13-2009 01:56 AM
Profile E-Mail PM Find Quote Report
ryxdp
Senior Member
****


Posts: 804
Reputation: 16
29 / Male / Flag
Joined: Jun 2006
RE: Closing a chat window
JScript code:
Interop.Call('user32','SendMessageW',ChatWnd.Handle,0x10 /* WM_CLOSE */,0,0);


That should do it :)
04-13-2009 02:02 AM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Closing a chat window
JScript code:
Interop.Call("User32.dll","DestroyWindow",ChatWnd.Handle);


No SendMessage(W) stuff, just a simple function that does the work for ya.
04-13-2009 01:36 PM
Profile PM Find Quote Report
afallenhope
New Member
*


Posts: 3
Joined: Apr 2009
RE: Closing a chat window
thanks guys.
didn't know you can use WindowAPI using pure JScript.. kinda dangerous if you think of it lol. Powerful.. I like it lol.
04-13-2009 10:50 PM
Profile E-Mail PM Find Quote Report
ryxdp
Senior Member
****


Posts: 804
Reputation: 16
29 / Male / Flag
Joined: Jun 2006
RE: RE: Closing a chat window
quote:
Originally posted by afallenhope
thanks guys.
didn't know you can use WindowAPI using pure JScript.. kinda dangerous if you think of it lol. Powerful.. I like it lol.

Yes, well, that's why we have people (? or is it just MenthiX?) who moderate submissions to the scripting database :P

EDIT: @SmokingCookie: you can also lop a few bytes off of that one, just have "user32" instead of that and the extension :P

This post was edited on 04-13-2009 at 10:54 PM by ryxdp.
04-13-2009 10:53 PM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: RE: RE: Closing a chat window
quote:
Originally posted by ryxdp
quote:
Originally posted by afallenhope
thanks guys.
didn't know you can use WindowAPI using pure JScript.. kinda dangerous if you think of it lol. Powerful.. I like it lol.

Yes, well, that's why we have people (? or is it just MenthiX?) who moderate submissions to the scripting database :P

EDIT: @SmokingCookie: you can also lop a few bytes off of that one, just have "user32" instead of that and the extension :P

I just love extensions :P

All Windows API functions are available in JScript through the Interop.Call() function, except for those which asynchronous callback functions. See the scripting documentation for more details on the Call() method.
04-14-2009 12:40 PM
Profile PM 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