AutoHotkey’s GroupAdd Command and Ahk_Group Create Multiple Context-Sensitive Hotkeys While Streamlining Code—Plus a Quick GroupAdd Script for Easy Window Handling!
Unlike AutoHotkey Hotstrings, there are numerous ways to manipulate Hotkeys—both while the script is loading (as in #Directives, discussed last time) or with various commands after the script is up and running. The most flexible of the interactive instructions is the Hotkey command which allows changes on the fly. The Hotkey command deserves much more attention (and will get it starting next time), but for now there are a couple more tricks demonstrating ways to make better use of the #IfWinActive directive in our example for blocking dangerous Windows shortcuts.