7.6

Table Of Contents
Javascript
Watch.SetVariable("MyVariable", "MyVariable Value");
Watch.SetVariable("global.MyVariable", "global.MyVariable Value");
Python
Watch.SetVariable("MyVariable", "MyVariable Value")
Watch.SetVariable("global.MyVariable", "global.MyVariable Value")
Perl
$Watch->SetVariable("MyVariable", "MyVariable Value");
$Watch->SetVariable("global.MyVariable", "global.MyVariable Value");
Watch.ExpandString
Provides access to the emulated job file and to all variables. This function returns a string that is the expanded version of the
input string.
Syntax
Watch.ExpandString(StringToExpand) -> string
Arguments
StringToExpand—A regular parseable string that may contain system variables (%u, %f), user variables (%1 to %9), octal
codes, and data selections.
Example
This example results in expanding the string of the variables to the date value in the following format: “YYYY-MM-DD”.
VBScript
Dim s
s= Watch.ExpandString("%y-%m-%d")
Watch.Log "Current Date is: " + s, 2
Javascript
var s;
s= Watch.ExpandString("%y-%m-%d");
Watch.Log("Current Date is: " + s, 2);
Python
s= Watch.ExpandString("%y-%m-%d")
Watch.Log("Current Date is: " + s, 2)
Perl
$s = $Watch->ExpandString("%y-%m-%d");
$Watch->Log("Current Date is: " . $s,2);
Watch.Log
Creates messages that are added to the PlanetPress Suite Workflow Tools watch.log file. The PlanetPress Suite Workflow
Tools watch.log file is located in ...\Program Files\PlanetPress Suite 7\PlanetPress Watch\Log\ppw[log date].log.
Using Scripts