ScriptEigener Objekttyp in der Automation Engine Function: Returns the values of script variables by indirect access.
Syntax
GET_SCRIPT_VAR(Script variable)
Syntax |
Description/Format |
---|---|
Script variable |
Placeholder for the name of the script variables whose values should be read.Format: AE name,script literal or script variable |
Comments
This script function reads the values of script variables. There is no need to set the names of the script variables. You can indirectly access these script variables by using a placeholder. This placeholder has the character of a variable. Therefore, you can easily query the values of many script variables (for example, in a processing loop). This script function replaces many conditional statements with a single scripting line.
You can use script variable in order to assign a string to this script function. The name of a script variable is the composed of this string. It is not required that the string begins with a "&" character which usually identifies a script variable. However, you must include as many of the variable name's initial characters that are required in order to clearly identify the script variable. If it cannot be identified, the system reads the value of the first applicable variable.
The variable name is searched as of the & or the next character. An error occurs if the specified string does not comply with any variable name's beginning.
This script element can also be used to retrieve the values of object and PromptSet variables.
Example
The following example is based on a VariableSpeichert oder ermittelt Werte dynamisch zur Laufzeit. Auch ein eigener Objekttyp in der Automation Engine. object and a job. The script variable names are stored in the Variable object.
In a processing loop, the job script reads the script variable name from the Variable object. This name is passed on to the variable &VALUE#. The script variable name and its value can be output in the activation report by using a PRINT statement in combination with the script variable "&VALUE#". This script variable includes the contents of END#, &START# and &ULTIMO#.
:SET &END# =
"20051027"
:SET &START# =
"20051024"
:SET &ULTIMO# = "20051031"
:SET &HANDLE# = PREP_PROCESS_VAR("SCRIPT_VARA")
:PROCESS &HANDLE#
: SET &VARIABLE# = GET_PROCESS_LINE(&HANDLE#,1)
: SET &VALUE# = GET_SCRIPT_VAR(&VARIABLE#)
: PRINT "&VARIABLE#
= &VALUE#"
:ENDPROCESS
:CLOSE_PROCESS &HANDLE#
Extract from the report:
2005-02-03 12:51:23 - U0020408 End = 20051027
2005-02-03 12:51:23 - U0020408 Start = 20051024
2005-02-03 12:51:23 - U0020408 Ultimo = 20051031
See also:
Script element | Description |
---|---|
|
|
Sets the values of script variables by indirect access. | |
Assigns a value to a script variable and saves it to the activation report. |
Script Elements - Script Structure and Processing
About Scripts
Script Elements - Alphabetical List
Script Elements - Ordered by Function