beautypg.com

The display script language, Display states, 2 the display script language – Micromod MOD: 30ML Display Script Guide User Manual

Page 41: 1 display states

background image

MOD 30ML Display Guide

Display Scripts

3.2 The Display Script Language

The display script language is used to develop custom displays or to modify displays that
are found in the Compound library. A Display Script is a file associated with each
Display Block, which consists of Display States, Event Scripts and Statements and uses
the following general format:

Figure 3 .1.

Display Script
General Format

DisplayStateN:

{

EventScript1:

{

Statement1;

StatementX;

}

EventScriptZ;

{

Statement1;

StatementY;

}

}

The open bracket ({) is used to identify that all script between it and its associated closing
bracket (}) are part of that particular display state or event script. Spacing between lines
and indenting are not critical in entering display scripts; indenting and spacing is done
only to help with organization. However, correct punctuation is critical to ensure proper
execution of display scripts. Most syntax and punctuation errors are detected and
identified by block name and line number at compile time.

3.2.1 Display

States

A Display State contains the various events and their associated script, which make the
display operate as the user wishes. Although up to 256 different states can be defined,
under most circumstances only one Display State will be used per Display block.

When using one Display State, DEFAULTS should be used as the Display State name.
This ensures the Display block will automatically find this state and execute its script.
Display state names are not case sensitive, however they must be correctly spelled. If you
elect to use a name other than DEFAULTS you are required to enter this name in the
Display State field located on the first page of the Display block.

A symptom of not spelling the Display State name correctly or forgetting to enter a
custom state name in the Display State field is that no action occurs when a defined
key is pressed.

An example of using multiple Display States is assigning multiple functions to a common
event within a Display block. A key event (that is, what happens when a key is pressed,
held or released) cannot be defined twice within one Display State, so additional states are

3 - 3