Emergency killswitch timer when Blockinput is active too long.

Get help with using AutoHotkey and its commands and hotkeys
HunterRodrigez
Posts: 7
Joined: 22 Apr 2020, 06:56

Emergency killswitch timer when Blockinput is active too long.

07 Aug 2020, 12:04

Hello.

I use Blockinput quite a lot for various reasons in my scripts and I would like to have an emergency killswitch timer in case I ever forget to add "Blockingput, off" to a hotkey or if something else goes wrong.

In short: I basically want the the exitapp command to be executed if blockinput is active for longer than... Let's say 5 seconds but I don't know how to go about it or if this is even possible.
lexikos
Posts: 7067
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Emergency killswitch timer when Blockinput is active too long.

07 Aug 2020, 22:01

You would have to avoid calling BlockInput directly, and instead call your own function which calls BlockInput and sets a timer.

If you're using BlockInput On and not BlockInput MouseMove, note that Windows has a built-in "emergency killswitch" for BlockInput.
When BlockInput is in effect, user input is blocked but AutoHotkey can simulate keystrokes and mouse clicks. However, pressing Ctrl+Alt+Del will re-enable input due to a Windows API feature.

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, Bing [Bot], boiler, Fayz, mikeyww, TAC109 and 36 guests