-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetWorkingDir has no effect on #Include #77
Comments
Hi! Thanks for the kind words.
which is 1:1 the title of this very issue :-) So it seems to me everything is (not) working exactly as intended. |
I guess you could use |
Ah, haha. I didn't catch that in the docs about |
If I try to use
I get the error:
|
Yeah pretty much as expected. Unsure when I'll fix that, so for now it seems you will have to specify full paths. Or you just cd into the actual directory before running. Or perhaps, you wrap the script into another script (bash, python, even another ahk_x11 script should do it) which sets the working dir to the script dir and then runs the actual script, whose includes will then work as expected. |
Ah yeah, good idea. I'll just do that for now. Thanks! |
Hello, thanks so much for your work on this project! I've just started using it and it's already invaluable to me.
I've noticed that even though I run
SetWorkingDir %A_ScriptDir%
at the top of my script,#Include
commands are being ran from the location that I started the script and not the location that the script is in.Here is the file in question. If I add
MsgBox
's to see the values of%A_ScriptDir%
and%A_WorkingDir%
before the#Include
's:The MsgBox's never pop up and the script fails saying
Error opening file with mode 'r': '/home/jared/src/layout-manager.ahk': No such file or directory.
If I comment out the
#Include
lines to see theMsgBox
's, the values actually look correct. They both popup with/home/jared/code/github/jmbeach/autohotkey-x11-scripts
even when I run from/home/jared
.The text was updated successfully, but these errors were encountered: