I have a script using a very simple run command.
Run, "C:\Program Files\obs-studio\bin\64bit\obs64.exe"
When I run this, I get an error telling me I don't have some locale file. If I personally navigate to that exact file by copying the path, pasting it into explorer and then run that EXE, I get no such error.
Why am I only getting the error when running with AHK? I'm running the exact same EXE file, so I can't believe it has to do with passing any sort of parameters, since I'm not using a shortcut link. I don't get errors when running any other EXE files either, it's only OBS.
Any ideas?
Can't open OBS
Re: Can't open OBS
Provide the second parameter to the 'run' command as the path to (but not including) your executable.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Re: Can't open OBS
Welcome to te forum!
Basically, what TAC109 said.
The shortcut that OBS creates, specifies a working directory... and if you start the exe directly from its own directory in file explorer, it will find - and use - this same directory by default, but an AHK script's run command will use the script's own working directory, if you omit the corresponding parameter. Hence, use this:
Also, don't use quotation marks in this parameter:
Basically, what TAC109 said.
The shortcut that OBS creates, specifies a working directory... and if you start the exe directly from its own directory in file explorer, it will find - and use - this same directory by default, but an AHK script's run command will use the script's own working directory, if you omit the corresponding parameter. Hence, use this:
Code: Select all
Run, "C:\Program Files\obs-studio\bin\64bit\obs64.exe" , C:\Program Files\obs-studio\bin\64bit
https://www.autohotkey.com/docs/commands/Run.htm#Parameters wrote:WorkingDir
The working directory for the launched item. Do not enclose the name in double quotes even if it contains spaces. If omitted, the script's own working directory (A_WorkingDir) will be used.
Re: Can't open OBS
Ah, wow, never knew about this. I did exactly as written here and it worked flawlessly. Thanks so much, you guys and gals are the best
-
- Posts: 1
- Joined: 21 Dec 2019, 20:45
Re: Can't open OBS
I created an account just to thank you for this post.gregster wrote: ↑ Do not enclose the name in double quotes in the parameter.Code: Select all
Run, "C:\Program Files\obs-studio\bin\64bit\obs64.exe" , C:\Program Files\obs-studio\bin\64bit
Force of habit to use the double quotes on everything and had no idea it would override the working directory. Thank you!
Re: Can't open OBS
It helps to know that working directories ought to be specified without quote. Just to add that, one can feed the numerous OBS launch parameters as well. Here is one example:
I use different profiles in OBS to specify the video output format, and use different scenes to stream, say, screen-captures or webcam-captures.
Code: Select all
Run, "C:\Program Files\obs-studio\bin\64bit\obs64.exe" --profile "StudyCam" --collection "LL" --scene "Zoom-MainCam" --startvirtualcam, C:\Program Files\obs-studio\bin\64bit
Who is online
Users browsing this forum: dunnerca and 152 guests