Execution Modes
[Predefined Variables]


Variables

counter EM_ANIMATE
 Indicates that the script is re-executed due to an animation.
counter EM_CHANGE
 Indicates that the script is re-executed after a change.
counter EM_KEYDOWN
 Indicates that the user pressed down a key. The key itself is available through the variable ToolName. See example scripts KeyTest1.clu and KeyTest2.clu for an application of this.
counter EM_KEYUP
 Indicates that the user pressed released a key. The key itself is available through the variable ToolName. See example scripts KeyTest1.clu and KeyTest2.clu for an application of this.
counter EM_LINK
 Indicates that the user clicked on a link in the info text window. The data passed by the link is stored in the predefined variable LinkData. See User Interactive Text for more details.
counter EM_NEW
 Indicates that this is the first time the script is being executed after loading.
counter EM_TOOL
 Indicates that the script is re-executed since the user has changed one of the tools. Which tool has been changed can be retrieved from the variable ToolName.
counter EM_USER
 Indicates that the script is re-executed because the user has changed one of the mouse mode variables.
counter ExecMode
 This variable is set to one of the values stored in the predefined variables starting with EM_.

Detailed Description

These variables can be used to check in which execution mode the script is currently executed. The variable ExecMode contains the currently set execution mode. Hence, you can, for example, check whether the script is re-executed after it has been changed with the following code.

Attention:
From version 1.5 onwards, the current execution mode can be a bitwise combination of a number of different modes. It is therefore necessary to check for a particular execution mode with the bitwise AND operation &.
if (ExecMode & EM_CHANGE)
{
    ?"Script is executed after change.";
}
else
{
    ?"Script is executed for some other reason.";
}

Variable Documentation

counter EM_ANIMATE
 

Indicates that the script is re-executed due to an animation.

Since:
v1.4

counter EM_CHANGE
 

Indicates that the script is re-executed after a change.

Since:
v1.4

counter EM_KEYDOWN
 

Indicates that the user pressed down a key. The key itself is available through the variable ToolName. See example scripts KeyTest1.clu and KeyTest2.clu for an application of this.

Since:
v2.0

counter EM_KEYUP
 

Indicates that the user pressed released a key. The key itself is available through the variable ToolName. See example scripts KeyTest1.clu and KeyTest2.clu for an application of this.

Since:
v2.0

counter EM_LINK
 

Indicates that the user clicked on a link in the info text window. The data passed by the link is stored in the predefined variable LinkData. See User Interactive Text for more details.

Since:
v2.1

counter EM_NEW
 

Indicates that this is the first time the script is being executed after loading.

Since:
v1.4

counter EM_TOOL
 

Indicates that the script is re-executed since the user has changed one of the tools. Which tool has been changed can be retrieved from the variable ToolName.

Since:
v1.5

counter EM_USER
 

Indicates that the script is re-executed because the user has changed one of the mouse mode variables.

Since:
v1.4

counter ExecMode
 

This variable is set to one of the values stored in the predefined variables starting with EM_.

Since:
v1.4