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

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 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..

• 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. – user313811 Mar 20 '16 at 5:51
• 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 – user313811 Mar 20 '16 at 5:56
• 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 Mar 26 '16 at 15:53
• 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 Mar 26 '16 at 15:54