7.1

Table Of Contents
Variable Name Description
Example Usage (VBScript)
"Watch.GetJobInfo" (page 210) Retrieves the content of a numbered job info (%1 to %9).
Example Usage: str = Watch.getjobinfo(9)
"Watch.GetVariable" (page 211) Retrieves the content of a local or global variable by name.
Example Usage: str = Watch.getvariable("Varname")
"Watch.ExpandString" (page 212)
Retrieves the content of any Workflow string, containing any variable available to Watch,
including data selections.
Example Usage: watchDate = Watch.expandstring("%y-%m-%d")
"Watch.Log" (page 212)
Writes to the Workflow log file, or the message window when in debug - can accept mul-
tiple log levels from 1 (red) to 4 (gray).
Example Usage: Watch.log "Hello, World!",1
"Watch.ShowMessage" (page
206)
Displays a popup dialog box to the user (user has to be logged on).
Example Usage: Watch.showmessage("Hello, World!")
"Watch.InputBox" (page 209)
Prompts the user for a string and returns the value(will not work when running as a serv-
ice)
Example Usage: str = Watch.inputbox("Caption","Message","default")
"Watch.SetJobInfo" (page 210) Writes the value of a string to a numbered job info.
Example Usage: Watch.setjobinfo 9, "String"
"Watch.SetVariable" (page 211) Writes the value of a string to a local or global variable by name.
Example Usage: Watch.setvariable "global.GlobalVar", "Hello World!"
"Watch.Sleep" (page 213) Pauses all processing for X milliseconds.
Example Usage: Watch.sleep(1000)
"Watch.ExecuteExternalProgram"
(page 207)
Calls and executes an external program in the command line.
Example Usage: Watch.executeexternalprogram "del *.ps" "c:\" 0 true
"Script.ReturnValue" (page 214) Returns a boolean True or False value to a Workflow scripted condition
Example Usage: Script.returnvalue = 1
Watch.GetPDFEditObject Is used to manipulate PDF files using the AlambicEdit API.
See the AlambicEdit API for more information.
Watch.ShowMessage
Displays a message to the user. This method is the same as PW_ShowMessage. Use this method to show the current mes-
sage displayed whether or not a user is logged in. Note that for this method to work, the "Run on Desktop"option must be ena-
bled and you must be logged on as the same user as the PlanetPress Watch Service.
Examples
In the following example, showmessage() displays a dialog box saying “test message”.
VBScript
Watch.ShowMessage("test message")
Javascript
Watch.ShowMessage("test message");
Using Scripts
©2010 Objectif Lune Inc - 206 -