Few shortcuts and start button become unresponsive for a few seconds after startup

0

Right after Windows (8.1) starts, I'm able to open folders using the shortcuts I set up in an AHK script, for two to three seconds.

But then, few keys become unresponsive:

  • the start button
  • the shortcuts that open folders

However, other keys work normally, even inside explorer, such as navigation keys, delete key, Alt+F4 and the like. There is no problem with the mouse either.

Windows seems to remember all the keystrokes I've pressed, because after a few seconds (about 5 to 10), when the keyboard shortcuts start responding again, all the folders (for which I pressed the assigned shortcuts during that 5 or 10 seconds) open up. Since I press the start button 10 to 15 times during that period of unresponsiveness, the start screen opens and closes several times after everything is normal again.

I'm using quite latest version of AHK (v1.1.22.06).

user313811

Posted 2016-03-13T14:25:30.483

Reputation:

Answers

0

I have seen this when I have an error on my AHK script.

What is happening is AutoHotkey is waiting for something to finish or happen. Since it has intercepted Windows' keyboard handler every keystroke is buffered until AutoHotkey can process them. So, once AutoHotkey is finished waiting (or processing or whatever its doing) all the keystrokes happen really quickly in succession.

Is there any code waiting for an event such as a window to open? Any timer code?

If you close the AHK file and restart it manually, does the same thing happen?

I would comment out everything in your script file except for just the key handlers you are running and slowly add everything back in..

Kody Brown

Posted 2016-03-13T14:25:30.483

Reputation: 249

The script has five timer codes. I tried commenting out these lines, but that didn't help. However, I haven't yet tried commenting out everything except the key handlers like you specified. I'll give that a try later. By the way, there is no problem when I restart it manually. It's only when it starts with windows that the problem occurs. – None – 2016-03-20T05:51:24.190

I'm assuming timer code means something like this:
Sleep 10000
Process, Exist, some_program.exe
If Not Errorlevel
Run D:\path\to\some_program.exe
– None – 2016-03-20T05:56:19.983

Yes, that is some of the timer code I was referring to. Also, anytime an application is started using Run, any WinWait or *Activate, etc.. – Kody Brown – 2016-03-26T15:53:29.630

When running during Windows's startup, is the script running with elevated permissions? I gave up trying to get .lnk files running on startup with elevated permissions. I use Scheduled Tasks instead for that.. – Kody Brown – 2016-03-26T15:54:50.447