The phantom
executable, phantom.exe, can accept several arguments. The syntax of
phantom.exe is:
phantom.exe [script] [-l count]
[-o file] [script_args]
where,
[script]
- The Phantom script to run [optional]
[-l count] - Run the
script 'count' times [optional]
[-o file] - Capture all
output to 'file' [optional]
[script_args] - Additional
arguments to pass to the script [optional]
Phantom with no arguments will run in console
mode.
The script_args must follow a script name. Anything after the script
name (other than -o and -l parameters) will be processed as script arguments.
Script arguments are simply regular phantom commands, with each command
separated by a semi-colon (;).
If a string is passed to a script using script_arguments, the string
quotes must be preceded by a \. This is only for the DOS version of
Phantom. If the '\' is not included, the quotes are ignored.
Run
a script:
phantom.exe sample.psc
Run a script 10 times:
phantom.exe sample.psc -l 10
Run a script and capture output to out.txt:
phantom.exe sample.psc -o out.txt
Run a script with arguments:
phantom.exe sample.psc int i = 10; string s = \"Hello\";
Run phantom in console mode:
phantom.exe
|