Jump to content

Recommended Posts

Posted (edited)

⚡ AutoIt Quick Tip: Changing Hotkeys at Runtime

HotKeySet($myKey, _MyFunc)
$oldKey = $myKey

; Change hotkey
HotKeySet($oldKey)        ; Unregister OLD key first
$myKey = "^!x"             ; Set NEW key this could also be done earlyer doenst matter because we have old key var :)
HotKeySet($myKey, _MyFunc)
$oldKey = $myKey

Remember:
Unregister OLD → Change variable → Register NEW

Otherwise you might end up with an old hotkey still lurking in the background so i share this Quick ReMinder for you and me ;)

Edited by BrAiNee

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...