matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: active window
code: function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage){
var _active_window = Interop.Call('user32', 'GetForegroundWindow');
if (oChatWnd.Handle === _active_window){
if (sOrigin !== Messenger.MyName){
merlin.Show();
merlin.Play("GetAttention");
merlin.Play("GetAttentionReturn");
merlin.Play("RestPose");
merlin.Speak(sOrigin + " says:" + nMessage);
}
}
}
|
|