Hi.
In v1 this code works like a charm.
Code: Select all
#Requires AutoHotkey v1.1.20
SetWorkingDir %A_ScriptDir%
myLib_func1()
Code: Select all
#Requires AutoHotkey v2.0
SetWorkingDir(A_ScriptDir)
myLibv2_func1()
Warning: This variable appears to never be assigned a value.
Specifically: global myLibv2_func1
But it does work if I add this line: #include <myLibv2>
Code: Select all
#Requires AutoHotkey v2.0
SetWorkingDir(A_ScriptDir)
#include <myLibv2>
myLibv2_func1()
Essentially the same in v1.... If a match is still not found and the function's name contains an underscore (e.g. MyPrefix_MyFunc), the program searches both libraries for a file named MyPrefix.ahk and loads it if it exists. This allows MyPrefix.ahk to contain both the function MyPrefix_MyFunc and other related functions whose names start with MyPrefix_.
What am I doing wrong?