Script Processor

From CRYSTALS

Jump to: navigation, search

Scripts is a macro language for automating tasks in CRYSTALS. It can also be used to write new dialog boxes to appear in the GUI. There are plenty of example scripts (possibly too many) in the /script/ subdirectory of your CRYSTALS installation.

Each script has a filename ending in .scp (e.g. xfour.scp) and is invoked from the CRYSTALS command line by typing, for example,

#script xfour
Script format
Structure blocks
Identifiers
Evaluating expressions
Structure commands (SCRIPT BLOCK LOOP IF CASE END ELSE)
Command line generation (COPY CLEAR INSERT SEND STORE QUEUE EXTERNAL EXECUTE EXTRACT)
Script user interface (GET VERIFY MESSAGE)
Expressions (EVALUATE VARIABLE INDEX)
Contingencies (ACTIVATE ON)
Generaledit
Miscellaneous script commands (FINISH SET SHOW)