Command Line Script Parameters

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Command Line Script Parameters

11 Aug 2014, 14:46

The docs say on CLI paremeters:
The script sees incoming parameters as the variables %1%, %2%, and so on. In addition, %0% contains the number of parameters passed (0 if none). However, these variables cannot be referenced directly in an expression because they would be seen as numbers rather than variables.
I was wondering if this could be improved for v2. E.g. all the parameters in an array/object?!?
I assume that any change in this area would require another reserved name, but that might be easier to understand/handle then the derefs of numbers.

PS: I searched if it was mentioned somewhere else before, but wasn't able to find anything. If there had been a discussion on it, please refer me to it. Thanks.
ciao
toralf
User avatar
fincs
Posts: 527
Joined: 30 Sep 2013, 14:17
Location: Seville, Spain
Contact:

Re: Command Line Script Parameters

11 Aug 2014, 14:56

In v2, A_Args is a superglobal variable that contains an array with the command line parameters. This is said in v2-changes.
fincs
Windows 11 Pro (Version 22H2) | AMD Ryzen 7 3700X with 32 GB of RAM | AutoHotkey v2.0.0 + v1.1.36.02
Get SciTE4AutoHotkey v3.1.0 - [My project list]
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Command Line Script Parameters

11 Aug 2014, 16:06

Thanks, I expected that I missed it somehow.
ciao
toralf

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Bassman002, Panaku, RussF, wpulford and 38 guests