DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Autohotkey/BlockInput Question  (Read 8,475 times)

gr8guitar

  • Participant
  • Joined in 2011
  • *
  • Posts: 1
Autohotkey/BlockInput Question
« on: March 03, 2011, 11:06 PM »
Hello, I am new to AutoHotKey, I am trying to use BlockInput but it requires a [CTRL][q] input from the keyboard. 1) what command looks for the input and 2) is there a way to bypass the keyboard input so it can run automatically (say 10 minutes while doing a backup)? gr8guitar@netzero.net, thank you.

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: Autohotkey/BlockInput Question
« Reply #1 on: March 04, 2011, 01:45 PM »
The following code (based on BlockInput):
Code
#SingleInstance,Force

applicationname=BlockInput

Run, <INSERT HERE BACKUP SCRIPT TO RUN>

BlockInput,On

counter:= <INSERT HERE THE TIME IN SECONDS TO BLOCK INPUT>

Loop,%delay%
{
  ToolTip,BlockInput resumes in %counter% seconds
  counter-=1
  Sleep,1000
}
ToolTip
BlockInput,Off
Return

Should do what you're looking for.

<WARNING: this is untested code, be careful when testing it>

Original address: https://www.donationcoder.com/forum/index.php?topic=25950.0