Get(ScriptName)
Category: Get
Syntax: Get ( ScriptName ) |
Parameters: None
Data type returned: Text
Description:
Returns the name of the current script even if paused. When no script is running, Get (ScriptName) returns an empty string.
One use of Get (ScriptName) is to capture errors. In this example, the Log Error script takes the script name as a parameter.
If [Get(LastError) <> 0] Perform Script ["Log Error"; Parameter: Get (ScriptName)] End If
Passing the current script's name as a script parameter can be useful anytime a subscript can be called by multiple scripts.
Examples:
Function |
Results |
---|---|
Get(ScriptName) |
Returns Calculate Invoice if the current script is Calculate Invoice. |