Why does running the direct path not work, but clicking on it does?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
newcod3r
Posts: 505
Joined: 30 Sep 2021, 02:16

Why does running the direct path not work, but clicking on it does?

26 Oct 2021, 19:00

Code: Select all

^#!o::
Run, C:\Program Files\obs-studio\bin\64bit\obs64.exe
return
This is what happens when I run it using the shortcut
image.png
image.png (3.52 KiB) Viewed 451 times
image.png
image.png (3.03 KiB) Viewed 451 times
but if I go to the exact same directory and click on it, no such error occurs:
image.png
image.png (92.79 KiB) Viewed 451 times
How do I fix my hotkey in AHK?
User avatar
mikeyww
Posts: 26972
Joined: 09 Sep 2014, 18:38

Re: Why does running the direct path not work, but clicking on it does?

26 Oct 2021, 20:24

You could try specifying the working directory. When omitted, the script's working directory is used.

Explained: Run
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Why does running the direct path not work, but clicking on it does?

26 Oct 2021, 20:33

Adding to what mikeyww said this will work: (tested)
Run, obs64.exe, C:\Program Files\obs-studio\bin\64bit
newcod3r
Posts: 505
Joined: 30 Sep 2021, 02:16

Re: Why does running the direct path not work, but clicking on it does?

27 Oct 2021, 00:15

mikeyww wrote:
26 Oct 2021, 20:24
You could try specifying the working directory. When omitted, the script's working directory is used.

Explained: Run
but OBS is the only app that has this issue though. For all other apps, I used the exact same syntax and it ran without issues.
User avatar
boiler
Posts: 16975
Joined: 21 Dec 2014, 02:44

Re: Why does running the direct path not work, but clicking on it does?

27 Oct 2021, 01:10

And your point is what? Since it’s not always needed, you shouldn’t ever have to do it? I suppose you can file your complaint with Microsoft. OBS is not the only app where it’s needed.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], scriptor2016 and 427 guests