TApxScript.PrepareScript

TApxScript

procedure PrepareScript;

Prepares the script command list and checks for syntax errors.

Before a list or file of script commands can be processed, it must first be prepared. This is similar in concept to compiling a program. Each script command is read, checked for syntax errors, and written to an internal list of compiled commands. When StartScript is called, it is this internal list of compiled commands that is executed.

When PrepareScript finds a syntax error it raises an EApxScriptError exception with one of the following error messages and the offending line number:

Not a valid script command. Line #
Bad format for first parameter. Line #
Bad format for second parameter. Line #
Label is referenced but never defined. Line #
Bad option in SET command. Line #
DOS error XXX while processing script. Line #