What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » crash on closing chat window (WLM9)

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
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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
Profile E-Mail PM Find Quote Report
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
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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
Profile E-Mail PM Find Quote Report
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
Profile E-Mail PM Find Quote Report
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
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
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
Profile PM Web Find Quote Report
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
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: crash on closing chat window (WLM9)
Just replace the SendMessage with PostMessage in your crash code:p

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
Profile PM Web Find Quote Report
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
Profile E-Mail 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