I now have this, and it's working:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
if(ChatWnd.Handle != Interop.Call('user32.dll', 'GetActiveWindow')) {
var objShell = new ActiveXObject("Shell.Application");
objShell.ShellExecute("C:\\Documents and Settings\\Dauntless\\My Documents\\My Downloads\\xps-led-control-exe\\police.bat", "", "C:\\Documents and Settings\\Dauntless\\My Documents\\My Downloads\\xps-led-control-exe", "open", 1);
}
}
If someone can point me to the documentation for User32.dll, that would be really helpful!