Comments, Messages, and Leading Spaces

Comments are very useful in a script, since they allow the programmer to record notes that explain the script or document its use. To create a comment, start the line with a colon (":").


: Example Script, Created 12/25/2007 by Martin Perlot
: This script doesn't really do anything!

Blank spaces at the beginning of a line are always ignored. In general, having extra blanks in a line is harmless.

If a line start with a quote character ("), the line will be displayed in the progress box. This character can also be used with an IF command. Values can also be displayed by enclosing their tags in square brackets.


DEFINE GENSTATUS 1FFDC [B1]
DEFINE GENTEMP 1FFDB [B2 *1.8 -40]
:Give the generator time to report
WAIT 5
"Generator Temperature = [GENTEMP] Degrees
IF [GENSTATUS == 0] {"The generator is stopped}

Note that the " symbol does not need a second closing symbol.

Two special items are defined for output. If [OSVERSION] is added to a quote command Omniscope adds the Omniscope version to the output. If [DATETIME] is added it adds the current date and time. Since the output window can be printed, this is an excellent tool for recording script operation.


"Quality Control Script
"Run on [DATETIME], using Omniscope [OSVERSION]