/
getGlobalStringVar
getGlobalStringVar
Description
Retrieves the value of a specified string 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 string value.
Functional area
Data retrieval
Command syntax
Syntax
getGlobalStringVar name |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
name | string | yes | Name of the variable to retrieve |
Flags
None
Return value
string
Examples
Script A // Define a global variable setGlobalVar myVar "ShogunPost 1.10"; Script B // Check to make sure global variable set in Script A still exists if (`getGlobalVarExists myVar`) { // Use it string $progName = `getGlobalStringVar myVar`; print($progName); }
Additional information
Related commands
, multiple selections available,
Related content
getGlobalVarExists
getGlobalVarExists
More like this
Work with variables in HSL scripts
Work with variables in HSL scripts
More like this
Work with HSL return values
Work with HSL return values
More like this
Work with HSL data types
Work with HSL data types
More like this
getIntProperty
getIntProperty
More like this
getIntArrayProperty
getIntArrayProperty
More like this