Here's some kode I keep handy to refresh my understanding of parsing args via GetCommandLine.

Note that certain args that are passed, like -d or /d are interpreted by Kix32.exe.. I generally use "--" as argument flags that get passed to the script - this way you can run things like "Kix32 MyScript --d --E:flag"

If you associate .KIX files with kix32.exe, make sure the registry Open\Command value looks like >> C:\local\bin\kix32.exe "%1" %* << so the arguments are properly passed.

Glenn

 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' ?

  ; 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 - figure out what to do
  $ARG = ''
  $Sep = ''
  For $I = 2 to UBound($CommandLine)
    $ARG = $ARG + $Sep + $CommandLine[$I]
    $Sep = ','
  Next
EndIf

'ARG: ' $ARG ?

_________________________
Actually I am a Rocket Scientist! \:D