Contents | Index | < Browse | Browse >
Two commands give you the means to run CLI commands :
CLI CommandLine
RUN CommandLine
Both are AREXX capable.
The CommandLine is anything that can be typed at a shell command prompt.
Note that the command line is a single argument, so, if it has spaces in
it (which it probably will), you MUST enclose it in quotes (single quotes
preferably).
Example :
RUN 'Dpaint $Myfile'
The difference between the 2 commands is :
RUN - will run the command line asynchronously
CLI - will run the command synchronously.
BE CAREFUL with the CLI command, as it will stop all processing of
Gui4Cli until the command you have given it has finished executing
(unless you have given something like : CLI 'run >NIL: Dpaint').
Both commands will set the $$RETCODE internal variable which you can check
to see if the command you issued worked or failed. 0 means OK.
This, usually, is only useful when using the CLI command, and
then, only if you don't "run" it.
Use IFEXISTS , WAIT and other methods if you want to make sure that you have
run the program successfully.
IMPORTANT : Some programs require a large amount of stack to run.
The default stack passed with the above CLI/RUN commands is 4000 bytes.
You can change this with the SetStack command, to any number you want.