What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Close Chat Window

Pages: (2): « First [ 1 ] 2 » Last »
Close Chat Window
Author: Message:
Luca
New Member
*


Posts: 11
35 / Male / Flag
Joined: Nov 2007
O.P. Close Chat Window
HI..:D
what's the code to close a chat window that i opened with OpenChat()?
11-27-2007 03:39 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Close Chat Window
code:
var oChatWnd = Messenger.OpenChat("johndoe@hotmail.com");
oChatWnd.Close(0);
11-27-2007 03:44 PM
Profile E-Mail PM Find Quote Report
Luca
New Member
*


Posts: 11
35 / Male / Flag
Joined: Nov 2007
O.P. RE: Close Chat Window
thank you...;)
11-29-2007 06:58 PM
Profile E-Mail PM Find Quote Report
Luca
New Member
*


Posts: 11
35 / Male / Flag
Joined: Nov 2007
O.P. RE: Close Chat Window
this code don't work..
code:
var finestra = Messenger.OpenChat(contatto.Email);
finestra.Close();
I can open the chat window,but I can't to close because this function genrate this error...
code:
Errore: Proprietà o metodo non supportati dall'oggetto (codice: -2146827850)
       File: example.js. Linea: 27.

I think that the function Close() close a window,not a CHATwindow....
12-06-2007 09:03 PM
Profile E-Mail PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: Close Chat Window
it's basically what matty said, but.. using API
code:
var oChatWnd = Messenger.OpenChat("johndoe@hotmail.com");
Interop.Call("user32", "SendMessageW", oChatWnd.Handle, 0x10 /*WM_CLOSE*/, 0,0);
;)
12-06-2007 09:16 PM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: RE: Close Chat Window
quote:
Originally posted by Luca
this code don't work..
code:
var finestra = Messenger.OpenChat(contatto.Email);
finestra.Close();
I can open the chat window,but I can't to close because this function genrate this error...
code:
Errore: Proprietà o metodo non supportati dall'oggetto (codice: -2146827850)
       File: example.js. Linea: 27.

I think that the function Close() close a window,not a CHATwindow....
True, you cannot close a chat window using the Close method since it's not available for the ChatWnd object.
Close it using the Win32 API:
code:
Interop.Call("user32", "DestroyWindow", oChatWnd.Handle);

12-06-2007 09:18 PM
Profile E-Mail PM Find Quote Report
Luca
New Member
*


Posts: 11
35 / Male / Flag
Joined: Nov 2007
O.P. RE: Close Chat Window
Thank you..I solve the problem...:d
12-06-2007 09:25 PM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Close Chat Window
quote:
Originally posted by Luca
finestra.Close(0);
12-06-2007 11:38 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Close Chat Window
or

code:
finestra.SendMessage("/Close")

;)
<Eljay> "Problems encountered: shit blew up" :zippy:
12-06-2007 11:53 PM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Close Chat Window
quote:
Originally posted by SpunkyLoveMuff
or

code:
finestra.SendMessage("/Close")

;)
That won't work when you don't have access to the typing area.  You are far better either using the Windows API or what NanaFreak posted so that the script doesn't fail.
[Image: markee.png]
12-07-2007 05:42 AM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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