mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2007
Posts: 3
S
soczol Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Nov 2007
Posts: 3
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.

Joined: Dec 2002
Posts: 5,421
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,421
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.

Joined: Nov 2006
Posts: 26
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Nov 2006
Posts: 26


codemastr_

Link Copied to Clipboard