crash on closing chat window (WLM9) |
Author: |
Message: |
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. crash on closing chat window (WLM9)
Hi!
if I use this function on messenger 8.5 it's all OK
code: var WM_CLOSE = 0x0010;
Interop.Call("user32", "SendMessageW", ChatWnd.Handle, WM_CLOSE, 0, 0);
but...if I use this on WLM 2009...
the chat window closes, but WLM non responding and I close it by task manager...
why? thank
|
|
02-02-2009 07:23 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: crash on closing chat window (WLM9)
Do you have Messenger Discovery Live installed? Closing the chat window like that shouldn't cause it to crash.
|
|
02-02-2009 07:32 PM |
|
|
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. RE: crash on closing chat window (WLM9)
no, I only have installed messenger plus 4.8...
|
|
02-02-2009 11:05 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: crash on closing chat window (WLM9)
Something REALLY weird is happening.
Mine isn't crashing HOWEVER the OnEvent_ChatWndCreated function is being called twice and the chat window is being opened twice and the handle of the window is obviously different. I wonder if WLM2009 tries to open it twice. Once to open and once to bring it forward?
|
|
02-03-2009 12:03 AM |
|
|
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. RE: crash on closing chat window (WLM9)
is probabily....
There are other ways to close the window?
|
|
02-03-2009 12:07 PM |
|
|
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. RE: crash on closing chat window (WLM9)
news!
code: function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
if(Message=="ok"){
Interop.Call("user32", "SendMessageW", ChatWnd.Handle, 0x0111, 40003, 0);
}
}
=CRASH
code: function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
if(Message=="ok"){
wnd = ChatWnd
MsgPlus.AddTimer("ok",2000)
return ""
}
}
function OnEvent_Timer(TimerId){
Interop.Call("user32", "SendMessageW", wnd.Handle, 0x0111, 40003, 0);
}
=WORK!
i think...the return is send before chat windows is closed... and that causes crash...
|
|
02-03-2009 12:24 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
RE: crash on closing chat window (WLM9)
Try PostMessage instead of SendMessage? Perhaps calling SendMessage within a Plus! event handler can cause unexpected troubles.
|
|
02-03-2009 12:33 PM |
|
|
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. RE: crash on closing chat window (WLM9)
emh...
can you tell me the exact code to try?
thank
|
|
02-03-2009 02:33 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
RE: crash on closing chat window (WLM9)
Just replace the SendMessage with PostMessage in your crash code
JScript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
if(Message=="ok"){
Interop.Call("user32", "PostMessageW", ChatWnd.Handle, 0x0111, 40003, 0);
}
}
|
|
02-03-2009 02:45 PM |
|
|
Suxsem
Junior Member
Posts: 66
Joined: Mar 2008
|
O.P. RE: crash on closing chat window (WLM9)
o thank
i try it later with my PC
wow! it's work! thank!!!
|
|
02-03-2009 03:08 PM |
|
|
|