Tool Variables
[Predefined Variables]


Variables

string ToolName
 Contains name of tool that is responsible for current execution of script, or the string None, if no tool caused the current execution.

Detailed Description

Currently there exists only one variable (ToolName) which contains the name of the tool that has caused a re-execution of the script. If the script is executed due to some other reason, then ToolName contains the string None. Here is a small example,

?a = Slider("Value a", -1, 1, 0.1, 0.5);
?b = Slider("Value b", -2, 2, 0.1, 1);

if (ExecMode & EM_TOOL)
{
    ?"Script is executed due to tool: \"" + ToolName + "\".";
}
else
{
    ?"Script is executed for some other reason.";
}

Depending on whether you move one or the other slider, the text in the text output window will change. Recall that in order to see the tools you need to drag up the window tiler from the bottom of the visualization window.


Variable Documentation

string ToolName
 

Contains name of tool that is responsible for current execution of script, or the string None, if no tool caused the current execution.

Since:
v1.5