2022.1

Table Of Contents
Note
While the functions here are in mixed case to simplify reading, it's important to note that
some languages (especially JavaScript) are case-sensitive and will require the proper
case. Examples in this chapter will always use the proper case when relevant.
Here is a list of the methods and functions that are available to you through the automation
object (or "Watch" object). While these examples are all in JavaScript, you can click on any
variable name to open a page to see examples for each supported language.
Variable Name Description
Example Usage (VBScript)
"Script.ReturnValue" on page174 Returns a boolean True or False value to a
Workflow scripted condition
Example usage:
Script.ReturnValue = 1;
"Watch.ExecuteExternalProgram" on
page160
Calls and executes an external program in the
command line.
Example usage:
Watch.ExecuteExternalProgram("lpr -S
192.168.100.001 -P auto
c:\\myfile.ps", "c:\\", 0, true);
"Watch.ExpandResourcePath" on
page162
Expands a Connect resource file name (e.g.
invoice.OL-template) to its fully qualified path (e.g.
C:\ProgramData\Objectif Lune\PlanetPress
Workflow\Documents\invoice.OL-template).
Example usage:
var fullPath =
Watch.ExpandResourcePath
("invoice.OL-template");
"Watch.ExpandString" on page162 Retrieves the content of any Workflow string,
Page 157