/
getGlobalBooleanVar
getGlobalBooleanVar
Description
Retrieves the value of a specified boolean global variable.
Shogun Post's scripting language supports global variables that are accessible across scripts within a session of Shogun Post. This command retrieves the value of a specified global variable (identified by the name argument of the command) which stores a Boolean.
Functional area
Data retrieval
Command syntax
Syntax
getGlobalBooleanVar name |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
name | string | yes | Name of the variable to retrieve |
Flags
None
Return value
boolean
Returns the Boolean value stored in the specified global variable. Can be true or false.
Examples
Script A // Set the special process flag to be used by other scripts setGlobalVar useSpecialProcess false; ... Script B // Check to make sure the special processing flag exists if (`getGlobalVarExists useSpecialProcess`) { // If it exists, use its value to determine what to do if (`getGlobalBooleanVar useSpecialProcess`) { print("Using special process"); } else { print("Not using special process"); } } else { print("Global variable useSpecialProcess not found"); }
Additional information
Related commands
, multiple selections available,