V2 Run command with Min Option

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
mmoore99
Posts: 2
Joined: 04 May 2023, 16:40

V2 Run command with Min Option

04 May 2023, 16:58

I am attempting to use the Run command with the Min option and am having a problem making it work.

Here is the run command without any options that works correctly:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"')
I then attempt to add the Min option without quotes and it generates a syntax error:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"',,Min)
This generates a syntax error.

I then attempt to add the Min option with quotes and it also generates a syntax error:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"',,"Min")
I would appreciate some guidance on what I am doing wrong. Thanks.
User avatar
FanaticGuru
Posts: 1908
Joined: 30 Sep 2013, 22:25

Re: V2 Run command with Min Option

04 May 2023, 17:06

mmoore99 wrote:
04 May 2023, 16:58
I am attempting to use the Run command with the Min option and am having a problem making it work.

Here is the run command without any options that works correctly:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"')
I then attempt to add the Min option without quotes and it generates a syntax error:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"',,Min)
This generates a syntax error.

I then attempt to add the Min option with quotes and it also generates a syntax error:

Code: Select all

run ('"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"',,"Min")
I would appreciate some guidance on what I am doing wrong. Thanks.

Remove space between Run and (

Code: Select all

Run 'Notepad.exe', , 'Min' 	; Ok
Run('Notepad.exe', , 'Min')	; Ok
Run ('Notepad.exe', , 'Min')	; Not Ok

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: metallizer, wineguy, zephyrus2706 and 62 guests