Page 1 of 1

a_args and parameter string

Posted: 18 Oct 2021, 15:27
by joefiesta
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

Re: a_args and parameter string  Topic is solved

Posted: 19 Oct 2021, 04:23
by Ragnar
Thanks for reporting. Changes added in PR #524.

Re: a_args and parameter string

Posted: 19 Oct 2021, 11:03
by joefiesta
Thanks Ragnar. I haven't tested, but what about a TAB character? (i suspect that is possible to get into a command line somehow.)

Re: a_args and parameter string

Posted: 01 Dec 2021, 04:23
by lexikos
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

Re: a_args and parameter string

Posted: 01 Dec 2021, 13:24
by joefiesta
@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.