Timing and Interactions with AutoHotKeys

I just discovered AutoHotKeys for Windows which is very helpful for assigning a single key (or chord) to common keystroke sequences, in a way Audacity alone doesn’t do. It makes some of my contemplated feature requests seem unnecessary now. I searched this forum and found surprisingly few posts about this useful program.

However: simply Send-ing keystroke sequences from AutoHotKeys scripts doesn’t always work as expected. It seems keystroke commands are not queued up by Audacity in case one of them takes too long to execute. They just get lost.

So I must put Sleep commands into the scripts to do what I want, and that’s hit and miss, with the sleeps being sometimes not long enough. And erring on the long side makes my shortcuts not quite so pleasingly short.

Any hope that this might be fixed? Any recommendations?

And should this post perhaps be in the miscellaneous programming board? Since AutoHotKeys is a programmable thing that isn’t Audacity itself or Nyquist.

On second thought, perhaps my problem is that when my script invokes a Nyquist effect, a progress dialog window that exists too briefly for me to see is sometimes intercepting some of the keystroke events I want to send. I should try a more sophisticated script using the WinWaitClose function of AutoHotKeys.

Anybody else have experience with this?