command line parameters

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dentopolis
Posts: 125
Joined: 06 May 2016, 16:28

command line parameters

06 Jan 2021, 15:04

I'm trying to launch this script, without any effect, please help:

Run, "C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe" -c "C:\Camera"

I've also tried:
Run, C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe -c C:\Camera
User avatar
mikeyww
Posts: 26859
Joined: 09 Sep 2014, 18:38

Re: command line parameters

06 Jan 2021, 15:08

The format looks OK. What happens with that same sort of command line in a Windows batch script?
TAC109
Posts: 1111
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: command line parameters

06 Jan 2021, 16:57

You probably need to set the WorkingDir parameter in the Run command to C:\Program Files\Adobe\Adobe DNG Converter.
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
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: command line parameters

07 Jan 2021, 10:56

Hi,

I think that
Run, "C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe" -c "C:\Camera"
will not run because of that spaces between the .exe-file-name.

Try

Code: Select all

program_to_run := chr(34) "C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe" chr(34)
program_to_run := program_to_run " -c " chr(34) "c:\camera" chr(34)
Clipboard := program_to_run			; for debugging purpose, you can copy that to a cmd-window and test it
run, %program_to_run%
regards
JB
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Ahk_fan
Posts: 237
Joined: 31 Aug 2018, 14:34
Contact:

Re: command line parameters

07 Jan 2021, 17:57

Run, ""C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe" "-c" "C:\Camera""

try this
regards,
AHK_fan :)
https://hr-anwendungen.de

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: haomingchen1998, mikeyww, mmflume, roysubs, scriptor2016, ShatterCoder and 104 guests