Standard Library (stdlib): Simple file-system approach
Install in the same directory where AutoHotkey is installed
[*:yl237ump]This version doesn't modify ahk or ahkx source files. It creates a temporary file in the script's directory (name of the script file + script extension + .tmp) then deletes the temp file (try not to blink... )
[*:yl237ump]Either use the .ahkx extension or right-click on a .ahk file and click Run script using Ahkx
[*:yl237ump]Optionally specify ; #UserLib \*None to ignore UserLib functions
[*:yl237ump]Standard Library files stored in the /Program Files/AutoHotkey/Include Folder
[*:yl237ump]UserLib files stored in the /MyDocuments/AutoHotkey/UserLib/ folder (not created by default)
[*:yl237ump]UserLib directory is searched first
[*:yl237ump]A couple of .ahk and .ahkx scripts are included in the zip file for testing
[*:yl237ump]This version will search for a file of the same name (+ .ahk) of the missing function. It does not currently search for groups. For example: it will not currently Include MyModule.ahk if the MyModule_Test1 function is not found. note: Although this version tested ok on my system and should not modify any existing scripts, use at your own risk...
#lib ; No libraries, so no searching. #lib path1 > path2 [> path3...] ; explicitly named directories. #lib ?path1 ; Use leading question mark to enable recursive search in that folder. #lib *std ; Search stdlib only. #lib ?*user > *std ; This is the default so would never need to be specified. #lib *std > ?*user ; reverse the default order: search std before user.
Although I haven't settled on that as the final syntax, feel free to do so.
I'm wondering if it would be more fun for me to attempt adding the functionality to AutoHotkey itself for fun though.
Not necessary unless its something that should be considered for the public release.
I can provide a download for the modified source if you'd like (if you'd like to yawn...).