Args() - Returns command line parameters as array

Post your working scripts, libraries and tools
Guest

Re: Args() - Returns command line parameters as array

17 Mar 2015, 21:05

Nah, I'm not the one passing command-lines to my script, it's other applications, so I have no control over that.
I just need to pass them along to another applications.
lexikos
Posts: 5933
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Args() - Returns command line parameters as array

21 Mar 2015, 17:36

You don't need COM/WMI. Just use DllCall( "GetCommandLine", "Str" ) as mentioned in the first post in this thread, but then don't call Args(). (You do still need to remove the executable name, though.)
Guest

Re: Args() - Returns command line parameters as array

06 Mar 2018, 20:20

Many thanks for posting this excellent script/function! :D
-JT
User avatar
gregster
Posts: 1171
Joined: 30 Sep 2013, 06:48

Re: Args() - Returns command line parameters as array

06 Mar 2018, 22:28

Guest wrote:Many thanks for posting this excellent script/function! :D
-JT

There is now the A_Args variable built-in into AHK: https://autohotkey.com/docs/Variables.htm#Args

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Cerberus and 12 guests