Automatic inclusion doesn't work with globals
Posted: 30 Jul 2020, 13:18
According documentation
*it works if function and file names are identical
However it doesn't seem to work if library defines global variables e.g.
library code:
main code:
but it works ok if we include library explicitly
main code:
Why? Does automatic include attendant library's function call omit everything except function definition?
(https://www.autohotkey.com/docs/commands/_Include.htm).Files can be automatically included (i.e. without having to use #Include) by calling a library function by name.
*it works if function and file names are identical
However it doesn't seem to work if library defines global variables e.g.
library code:
Code: Select all
global msg := "test"
f() {
msgbox %msg%
}
Code: Select all
f()
main code:
Code: Select all
#Include <f>
f()