mIRC Homepage
Hi,

I was wondering if there is some way to 'programmatically' achieve the Ctrl+Break functionality in mIRC. There are some ocassions where scripts never complete. Ctrl+Break solves that by aborting the script execution. Basically what I want to do is send a signal to mIRC to break when it hasn't been responding for a while/is using a large amount of cpu for a long time.

I've tried using SendMessage to mIRC's main window, and i've tried making the mIRC main window the 'foreground' window and then using SendInput and keybd_event (using C/C++ code), without any results tho. When I manually hit Ctrl+Break in the mIRC window it breaks immediately.

Is there any way to achieve this? What 'key' is mIRC waiting for? VK_CANCEL? Some other combination?

Any help would be appreciated.
The Control+Break key combination sends a VK_CANCEL to mIRC, so that is what it is looking for. However, I doubt you will be able to use SendMessage() since mIRC cannot process Windows messages while it is in a scripting loop. You would probably have to find some other way of changing the system keyboard state, although I have no idea how you would do that for another application.
id recommend taking a peek at http://www.mircscripts.org/comments.php?cid=2617
© mIRC Discussion Forums