a_args and parameter string Topic is solved

Share your ideas as to how the documentation can be improved.
joefiesta
Posts: 494
Joined: 24 Jan 2016, 13:54
Location: Pa., USA

a_args and parameter string

Post by joefiesta » 18 Oct 2021, 15:27

Re doc at: https://www.autohotkey.com/docs/Scripts.htm#cmd

The above states:

"Script Parameters: The string(s) you want to pass into the script, with each
separated from the next by a space. Any parameter that contains spaces should
be enclosed in quotation marks"

Specifically, the above doc statement says parameters are separated by "a space". That leads
me to infer that the occurrence of two spaces in a parameter string indicates
there is an "intervening" parameter which is a null or "".

Since THIS IS NOT THE CASE, I believe the documentation should read:

Script Parameters: The string(s) you want to pass into the script, with each
separated from the next by one or more spaces. Any parameter that contains
spaces should be enclosed in quotation marks

User avatar
Ragnar
Posts: 608
Joined: 30 Sep 2013, 15:25

Re: a_args and parameter string  Topic is solved

Post by Ragnar » 19 Oct 2021, 04:23

Thanks for reporting. Changes added in PR #524.

joefiesta
Posts: 494
Joined: 24 Jan 2016, 13:54
Location: Pa., USA

Re: a_args and parameter string

Post by joefiesta » 19 Oct 2021, 11:03

Thanks Ragnar. I haven't tested, but what about a TAB character? (i suspect that is possible to get into a command line somehow.)

lexikos
Posts: 9494
Joined: 30 Sep 2013, 04:07
Contact:

Re: a_args and parameter string

Post by lexikos » 01 Dec 2021, 04:23

AutoHotkey does not parse the command line. A_Args is populated based on an arg array provided by the C runtime, which is also used to process the built-in command line switches.

Parsing C Command-Line Arguments | Microsoft Docs

joefiesta
Posts: 494
Joined: 24 Jan 2016, 13:54
Location: Pa., USA

Re: a_args and parameter string

Post by joefiesta » 01 Dec 2021, 13:24

@Lexikos - thanks for pointing me to the C documentation. It was great reading. While it is quite precise, it can certainly be seen as the cause of the lack of precision in the AHK doc. Since the microsoft doc is not 100% precise, I submitted feedback about white space being one OR MORE spaces or tab characters.

Post Reply

Return to “Suggestions on Documentation Improvements”