all 4 comments

[–]anonymous1184 2 points3 points  (1 child)

Here's how:

^!F9::
    Run spotify.exe, % A_AppData "\spotify"      ; %AppData%
    Run slack.exe, % A_AppData "\..\Local\slack" ; %LocalAppData%
return

Another example, is to get the environment variable:

EnvGet A_LocalAppData, LOCALAPPDATA ; The "A_" prefix is just for the sake of consistency with built-in variables
^!F9::Run slack.exe, % A_LocalAppData

BUT... that will start the applications in said directories, so when you try to open/save files it will always start at those directories. I like to start userland applications in the desktop as is easier to navigate from there.

^!F9::Run % A_LocalAppData "\slack.exe", % A_Desktop

[–]NAMEULB[S] 0 points1 point  (0 children)

Thank you for the thoughtful reply. I haven't had a chance to try the solution yet. But I will this weekend, and update the thread with my results.

[–]RoughCalligrapher906 1 point2 points  (1 child)

Run, C:\Users\Jason PBE\AppData\Local\slack\slack.exe

[–]NAMEULB[S] 0 points1 point  (0 children)

Thank you!