I don't know if there's a workaround for this, but since we're in a fresh beta, it might be easy to fix.

If I run the command
 Code:
kix32 myscript.kix filename -switch
the code will run properly, and then kix will complain "ERROR : failed to find/open script [filename]!" It recognizes switches with "-" or "/" properly.

The simple workaround is to use Quit instead of Exit, but that won't work for me. I have a command-line tool that takes a simple name (no leading - or /) argument followed by 0 or more switches. This script does complex processing, and has numerous switches. There are two front-end scripts - a GUI and a sequencer. The GUI simply collects screen settings and calls the core script with the assembled parameters. The sequencer calls the core script several times, once for each simple name argument. As such, I need to return control to the higher-level Kix scripts, so can't use Quit in the core script.

At this time, I use a batch file that calls the core script with $ARG1=%1 and $ARG2=%ARGS%. The front-end scripts call the bat file instead of the core script directly. I'd like to move away from batch file front-ends and use GetCommandLine in the core script.

What would work really well with GetCommandLine is a corresponding FlushCommandLine command. It would simply remove all arguments from the command line after the current script name (using GetCommandLine(1), any element above 1 would be cleared.) Thus, if you ran
 Code:
kix32.exe script1 script2
it would work properly since script1 doesn't mess with the commandline. However, if you ran
 Code:
kix32 script1 filename
and script1 ran the FlushCommandLine command, it would exit and Kix would not try to execute "filename" as if it were a script.

Thanks for the consideration.

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