Hi,
So far I have been writing scripts in Fastkeys pointing to absolute paths. Example:
"G:\Program\Name\File.exe"
However, as many of my programs are portable and stored in the same drive as FastKeys, I would like to know a syntax that would make the scripts working from any driver. So if the driver is connected as Y ("Y:\Program\Name\File.exe"), the scrip wouldn't break because it is still looking in the absolute path "G:\Program\Name\File.exe".
Just as a reference, I would expect something as "?:\Program\Name\File.exe" or "..\Program\Name\File.exe" etc.
Can I write scripts in Fastkeys using relative paths?
Thank you very much!
Cadu
What syntax for relative paths used in scripts (eg. if driver letter change G to Y the script should keep working)
You can use built-in variables like
A_WorkingDir
A_ScriptDir
A_WinDir
A_ProgramFiles
A_AppData
A_MyDocuments
etc...
https://www.autohotkey.com/docs/Variables.htm#prop
../ type syntax should also work.
A_WorkingDir
A_ScriptDir
A_WinDir
A_ProgramFiles
A_AppData
A_MyDocuments
etc...
https://www.autohotkey.com/docs/Variables.htm#prop
../ type syntax should also work.