Block input for a certain time

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ahkfan
Posts: 16
Joined: 14 Feb 2018, 20:01

Block input for a certain time

22 Feb 2018, 10:42

Please help me with a code which would block all keyboard and mouse input for a certain amount of time (let's say 20 seconds) and preferably showing some gif with progress bar or a countdown timer.

For a start, here's code which blocks input until the word test is entered.

Code: Select all

BlockInput,On
Loop
{
Input,var,C L1
ToolTip % var
If var=test
	Break
}
BlockInput,Off
ExitApp
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Block input for a certain time

22 Feb 2018, 11:01

Once you're pressing Ctrl+Alt+Del you can stop that script anyway, so what?!
ahkfan
Posts: 16
Joined: 14 Feb 2018, 20:01

Re: Block input for a certain time

22 Feb 2018, 11:48

That's not for security. In my case It's to prevent user from interaction with freshly launched browser while it loads rss feeds. It takes about 15-20 seconds, so I want to be sure that the user starts work when everything's ready. The user is with special needs so it's hard to rely on his understanding/remembering of 'wait 20 seconds before you start' rule.
ahkfan
Posts: 16
Joined: 14 Feb 2018, 20:01

Re: Block input for a certain time

23 Feb 2018, 06:50

Ok, I've found a workaround solution:
Start browser and mpc-hc player from a batch file with path to progress_bar.gif as an argument to mpc-hc with 'close on end' and fullscreen options preset.

Code: Select all

start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
start "" "C:\Program Files\MPC-HC\mpc-hc64.exe" "c:\Users\username\Downloads\progress_bar.gif"
But If someone colud make an actual AHK script doing things I described in the initial post, it would be awesome.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: fiendhunter and 230 guests