7.4

Table Of Contents
Watch.GetVariable
Returns the string value of the corresponding variable name. Note that if an undeclared variable is called using this method, an
error will be generated.
Syntax
Watch.GetVariable(Name: String): String
Example
VBScript
Dim s
s = Watch.GetVariable("MyVariable")
Watch.Log "MyVariable's value is: " + s, 2
s = Watch.GetVariable("global.MyVariable")
Watch.Log "global.MyVariable's value is: " + s, 2
Javascript
var s;
s = Watch.GetVariable("MyVariable");
Watch.Log("MyVariable's value is: " + s, 2);
s = Watch.GetVariable("global.MyVariable");
Watch.Log("Jobinfo 3's value is: " + s, 2);
Python
s = Watch.GetVariable("MyVariable")
Watch.Log("global.MyVariable's value is: " + s, 2)
Perl
$s = $Watch->GetJobInfo(3);
$Watch->ShowMessage("global.MyVariable's value is: " . $s, 2);
Watch.SetVariable
Sets the variable to a specified string value. Note that if an undeclared variable is called using this method, an error will be gen-
erated.
Syntax
Watch.SetVariable Name: String; Value: String
Example
VBScript
Watch.SetVariable "MyVariable", "Desired value"
Watch.SetVariable "global.MyVariable", "Desired value"
Javascript
Watch.SetVariable("MyVariable", "Desired value");
Watch.SetVariable("global.MyVariable", "Desired value");
Using Scripts