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 |
|
|
NanaFreak
Scripting Contest Winner
Posts: 1476 Reputation: 53
32 / /
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 |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
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?
<Eljay> "Problems encountered: shit blew up"
|
|
03-30-2009 08:33 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
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 |
|
|
ryxdp
Senior Member
Posts: 804 Reputation: 16
29 / /
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 |
|
|
SmokingCookie
Senior Member
Posts: 815 Reputation: 15
30 / /
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 |
|
|
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 |
|
|
ryxdp
Senior Member
Posts: 804 Reputation: 16
29 / /
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
EDIT: @SmokingCookie: you can also lop a few bytes off of that one, just have "user32" instead of that and the extension
This post was edited on 04-13-2009 at 10:54 PM by ryxdp.
|
|
04-13-2009 10:53 PM |
|
|
SmokingCookie
Senior Member
Posts: 815 Reputation: 15
30 / /
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
EDIT: @SmokingCookie: you can also lop a few bytes off of that one, just have "user32" instead of that and the extension
I just love extensions
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 |
|
|
|