autohotkey - (AHK) Creating variable hotkeys that gets the key names from a 2 char file name of a script -
i'm trying make our employees use dont have alter script define hotkeys. may work hotkeys can defined single character, that's fine, there many combinations can made them, , can easy remember. script @ 2 character ahk files (or 6 if must include extension) in working directory. , variables search defined regex first hotkey, ^. , second .(?=.) once match found, launch matched file. has been done before? seems simple can't seem find on it.
edit: elliot brought attention: http://autohotkey.com/board/topic/60630-easy-editmanage-hotkeyshotstrings-plugin-ahk-l/
it's neat script manager, , useful, it's not i'm looking for.
i dont not want additional interface. want able change hotkeys using filename.
based on answer of forvin. added execution of corresponding ahk script.
#persistent settimer, findnewhotkeys, 2000 findnewhotkeys: loop, %a_scriptdir%\* { regexmatch(a_loopfilename, "^(.)(.).ahk$", hk) if (hk) { hotkey, ~%hk1% & ~%hk2%, hotkeylabel } } return hotkeylabel: regexmatch(a_thishotkey, "~(.) & ~(.)", hk) run, %hk1%%hk2%.ahk return
Comments
Post a Comment