Here's something to play with - save this as GetArg.kix:
 Code:
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


Try this running "kix32 GetArg.kix $ARG='a,b,c'", and then again running "kix32 GetArg.kix -a -b -c". Try it again without the leading "-" chars on the args. Try including "-d" and see what happens. Try the examples again without the "Quit 0" at the end of the script.
This should illustrate the capabilities and limitations of the GetCommandLine() function.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D