I am using V2.
In Windows I moved my default Documents directory and I seem to be unable to find/run custom functions from this location
D:\Users\MYUSERNAME\Documents\AutoHotkey\Lib
First I wrote and saved this file (hello.ahk), which works as expected:
Code: Select all
F1::
{
x := "Hello World!"
msgbox X
}
F2::
{
helloWorld()
}
;F3::
;{
; helloWorld2()
;}
;;;;;;;;;;;;;;;;;;;
;; local functions
;;;;;;;;;;;;;;;;;;;
helloWorld() {
x := "Hello World!"
msgbox X
return
}
Code: Select all
helloWorld2() {
x := "Hello World!"
msgbox X
return
}
D:\Users\MYUSERNAME\Documents\AutoHotkey\Lib\helloWorld2.ahk
When I uncomment the "F3" lines in the original hello script from that Lib I get the following error:
Warning: This variable appears to never be assigned a value.
Specifically: local helloWorld2
012: }
015: {
▶ 016: helloWorld2()
017: }
024: {
For more details, read the documentation for #Warn.
To test I tried to directly include the function with the line:
#Include "D:\Users\MYUSERNAME\Documents\AutoHotkey\Lib\helloWorld2.ahk"
That worked as expected.
When I changed the default "Documents" director, did that break the default access to the "\Documents\AutoHotkey\Lib\" location , or am I doing something else wrong?