I have multiple .ahk scripts, but I have a master script that has all of my main definitions, master.ahk. In the other scripts, they could be partially working or testing, and I might have keybindings that conflict with the master.ahk
If there is a keybinding in the second that is not in the first, I want that to load, but if there is a keybinding in the second file that was already loaded by the first, I do not want that definition to load as if master.ahk is loaded, I want that to ake precedence (if I want to test alternative keybindings in the other scripts, I will manually unload master.ahk and then load the subscript and test it). Is that possible?
Further, what if I want the other way around, and I want my otherstuff.ahk script to take precedence over master.ahk, so that it takes over keybindings, and then when I unload otherstuff.ahk, it reverts to the bindings in master.ahk. Is that possible?
Script precedence in loading definitions
Re: Script precedence in loading definitions
Hallo,
I have not tested it, but it should work.
Switch all scripts to DetectHiddenWindows true and group the hotkeys by #HotIf WinExist( resp. #HotIf !WinExist( according to the hidden script's main window https://www.autohotkey.com/docs/v2/Program.htm#main-window
So each script controls the activity of its hotkeys according to the existence of other running scripts.
I have not tested it, but it should work.
Switch all scripts to DetectHiddenWindows true and group the hotkeys by #HotIf WinExist( resp. #HotIf !WinExist( according to the hidden script's main window https://www.autohotkey.com/docs/v2/Program.htm#main-window
So each script controls the activity of its hotkeys according to the existence of other running scripts.
Who is online
Users browsing this forum: DavidP and 91 guests