Inception
Inception

Reputation: 465

Find path from where .exe is run Autohotkey

I have a compiled ahk script in which I use %_A_WorkingDir% to get the current working directory. But now I'm calling the .exe from another file two folders up so %_A_WorkingDir% returns the directory that is two folders up, not the location of the actual .exe. How do I fix this issue?

Upvotes: 0

Views: 1933

Answers (1)

Relax
Relax

Reputation: 10636

  • A_WorkingDir is the directory in which the script is currently working. You can change it by using the command SetWorkingDir.

  • A_ScriptDir is the full path of the directory where the script is in.

  • A_ScriptFullPath is the full path of the current script.

https://autohotkey.com/docs/Variables.htm#prop

Upvotes: 2

Related Questions