Provides a simple, regular expression-based script interpreter. The implementation provides the list of files to process in the constructor and a list of predefined variables, then calls start(). The interpreter does not run inside the start() call; instead, a timer is started that interprets one line on each tick. The frequency of the timer is adjustable from the script file using the Frequency command. rexscript provides some basic commands, like including other files, controlling verbosity and manipulating variables (see full list), but for the most part the user is expected to implement what it needs. Access to variables is provided using the special ${markers} to get the values and variable names for some special functions.
Variables are implemented using varmap library, so they all are arrays of strings. Following examples are all valid:
Content of the array may be glued into a single construct like so:
As part of the initialisation, RexScript copies environment variables as internal variables, so they are readly available to control files (platform specific separators like ";" on Windows and ":" in unixes are used to split the value into components). Note that changing these values has no effect on the actual environment - use dedicated method to set them. Depedencies: Related source code documentation: RexScript, RexScriptBlock
|