Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

PERMANENTLY turn off that annoying hotkey limit


  • Please log in to reply
11 replies to this topic
Keiji
  • Guests
  • Last active:
  • Joined: --
Can we PLEASE have a global option to turn this off for ALL scripts?

I use AHK to remap the controls on a lot of games which I play in fullscreen.

AHK seems to have a bug where it spontaneously decides to count far too many hotkeys that haven't actually been pressed, and then minimizes the game without warning to display this stupid message box. This annoys the hell out of me and usually messes up my game progress.

I'm not adding lines to EVERY SINGLE AHK SCRIPT ON MY COMPUTER to get round this. There should be a way to permanently turn this off.

flak
  • Members
  • 283 posts
  • Last active: Jan 01 2012 06:20 PM
  • Joined: 02 Oct 2009

AHK seems to have a bug where it spontaneously decides to count far too many hotkeys that haven't actually been pressed

More like, one of your scripts presses keys which are hotkeyed in the same or some of the other scripts and it creates a loop.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
The specific solution to your request is to just set #MaxHotkeysPerInterval to a very large number, but you're better off fixing your script. If you add the #UseHook directive to your script, it will prevent all hotkeys below it from looping.

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
An example of this would be the following script:
g::
Send g
return
And it gives this error message when g is held down for about one second:

---------------------------
scriptname.ahk
---------------------------
71 hotkeys have been received in the last 1108ms.

Do you want to continue?
(see #MaxHotkeysPerInterval in the help file)
---------------------------
Yes No
---------------------------


If this is the error you get, then use Lexikos's suggestion of #UseHook or add the $ modifier to the affected hotkeys.
$g:: ...
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008

If you add the #UseHook directive to your script, it will prevent all hotkeys below it from looping.

Thanks Lexikos, again what learned. :)

Keiji
  • Guests
  • Last active:
  • Joined: --
Apologies for my previous post, as you can probably tell I was rather annoyed when posting it. ;)

The scripts that get these warnings generally look like this:

RunWait <redacted>
ExitApp

*f::z
*d::shift
*s::x

Nowhere in there did I have a hotkey call itself - and it still brings up the warning on occasion.

And for arguments' sake, if I had something like:

*f::d
*d::s
*s::a

Would that count has having hotkeys call themselves?

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008

And for arguments' sake, if I had something like...Would that count has having hotkeys call themselves?

No. Either putting a * before a hotkey, or directly remapping it to another key (or both) uses the keyboard hook. When the keyboard hook is used hotkeys wont call themselves.
Note: Remapping refers to hotkey::newkey syntax. Meaning no send command or multi-line hotkeys.
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

jaco0646
  • Moderators
  • 3165 posts
  • Last active: Apr 01 2014 01:46 AM
  • Joined: 07 Oct 2006
The default #MaxHotkeysPerInterval is 70.
The default #HotkeyInterval is 2 seconds.

Every hotkey will popup a warning after holding it for 2 seconds, because even an old, slow piece of junk like I have can send 70 keystrokes in 2 seconds.
z::return  ;Holding z gives me a warning after 1.7 seconds.
As Lexikos said, increasing #MaxHotkeysPerInterval alleviates the problem.
#MaxHotkeysPerInterval 200  ;example from Help file
z::return                   ;I can hold z all day long.
Decreasing #HotkeyInterval works as well.
#HotkeyInterval 1000
z::return             ;I can hold z all day long.


  • Guests
  • Last active:
  • Joined: --
Thanks, this was helpful :-)

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
What's the purpose of a HotkeyInterval? Why does one exist?
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

traduceretehnica
  • Members
  • 1 posts
  • Last active: May 15 2012 09:29 AM
  • Joined: 15 May 2012
Thank you very much for the helpful information.I hope we can do great things in the future

Showle1943
  • Members
  • 1 posts
  • Last active: May 28 2012 07:44 PM
  • Joined: 28 May 2012

Can we PLEASE have a global option to turn this off for ALL scripts?

I use AHK to remap the controls on a lot of games which I play in fullscreen.

AHK seems to have a bug where it spontaneously decides to count far too many hotkeys that haven't actually been pressed, and then minimizes the game without warning to display this stupid message box. This annoys the hell out of me and usually messes up my game progress.

I'm not adding lines to EVERY SINGLE AHK SCRIPT ON MY COMPUTER to get round this. There should be a way to permanently turn this off.


Yes. YES. YES!!! Can't even begin to articulate how annoying it is. I need all the help I can get game time. Don't need anything messing up my concentration! :-)