Closed rshipp closed 12 years ago
Oops, nevermind. I just realized that CGUI must be included at the end of the script (or at least the auto-execute section) in order to function properly anyway.
This is because #include
On Sat, Jun 30, 2012 at 2:15 AM, george2 < reply@reply.github.com
wrote:
When I #include CGUI, it somehow changes the include dir, so that future includes have to be specified with an absolute path. For example, this is my setup:
main ahk script:
#include src\somefile.ahk #include src\ui.ahk #include src\someotherfile.ahk
ui.ahk:
#include <CGUI>
Now, when I run the main script, I get an error:
#Include file "src\someotherfile.ahk" cannot be opened.
If I change the main script to
#include src\somefile.ahk #include src\ui.ahk #include %A_ScriptDir%\src\someotherfile.ahk
or
#include %A_ScriptDir%\src\somefile.ahk #include %A_ScriptDir%\src\ui.ahk #include %A_ScriptDir%\src\someotherfile.ahk
then everything works as expected. I'm not sure what's causing this, but is there any way to stop this behavior?
Thanks
Edit: Adding
#include %A_ScriptDir%
after the CGUI include also works to reset my include dir to its original value.
Reply to this email directly or view it on GitHub: https://github.com/ChrisS85/CGUI/issues/49
When I #include CGUI, it somehow changes the include dir, so that future includes have to be specified with an absolute path. For example, this is my setup:
main ahk script:
ui.ahk:
Now, when I run the main script, I get an error:
If I change the main script to
or
then everything works as expected. I'm not sure what's causing this, but is there any way to stop this behavior?
Thanks
Edit: Adding
#include %A_ScriptDir%
after the CGUI include also works to reset my include dir to its original value.