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 generated.

Syntax

Watch.SetVariable (Name: String; Value: String)

Example

JavaScript

Watch.SetVariable("MyVariable", "Desired value");
Watch.SetVariable("global.MyVariable", "Desired value");

VBScript

Watch.SetVariable "MyVariable", "Desired value"
Watch.SetVariable "global.MyVariable", "Desired value"/

Python

Watch.SetVariable("MyVariable", "Desired value")
Watch.SetVariable("global.MyVariable", "Desired value")

Perl

$Watch->SetVariable("MyVariable", "Desired value");
$Watch->SetVariable("global.MyVariable", "Desired value");