Break On
'GetArg - ' @KIX ? ?
; $ARG can be passed on the command line,
; or can be gathered by the GetCommandLine() function
; $ARG will be declared (Global) if it was passed on the command line
If IsDeclared($ARG)
'ARG passed' ?
Else
If CDbl(@KIX) < 4.53
"Can't enumerate args in Kix v" @KIX ?
Quit 0
EndIf
Global $ARG
'ARG captured by GetCommandLine' ?
; Parse the command line
$CommandLine = GetCommandLine(1)
; Complain and exit if no arguments were specified.
If UBound($CommandLine) = 1
'No input arguments were specified.' ?
Quit 1
EndIf
; Have arguments - build a comma-delimited list for this example
$ARG = ''
$Sep = ''
For $I = 2 to UBound($CommandLine)
$ARG = $ARG + $Sep + $CommandLine[$I]
$Sep = ','
Next
EndIf
'ARG: ' $ARG ?
Quit 0 ; needed if passed args don't have - or / predecessors