Hi Hit,
I tested your script, and I have a suggestion :
Your script :
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message) {
var Val=Interop.Call("User32.dll", "MessageBoxW", 0,"Are you sure, you want to send:" + Message,"Sure?", 4|32);
if (Val==6) { // Yes
// ....
}
else if (Val==7) { // No
return "";
}
}
With your script, when the MsgBox appears, she's not linked to the chat window (I hope that's comprehensible...) So, the chat window is still enable.
You should use that :
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message) {
var Val=Interop.Call("User32.dll", "MessageBoxW", ChatWnd.Handle,"Are you sure, you want to send:" + Message,"Sure?", 4|32);
if (Val==6) { // Yes
return; // Not compulsory, but for the understanding
}
else if (Val==7) { // No
return "";
}
}