7.4
Table Of Contents
- Copyright Information
- Table of Content
- Overview
- Getting Started
- Understanding PlanetPress Suite Workflow Tools
- The Nature of PlanetPress Suite Workflow Tools
- The Three Flavors of the PlanetPress Suite Workflow Tools
- Terms and Definitions
- About Configurations
- About Processes
- About Subprocesses
- About Tasks
- About Branches and Conditions
- About Data
- About Data Selections
- About Data Emulation
- About Related Programs and Services
- About Documents
- About Printing
- The PlanetPress Suite Workflow Tools Configuration Program
- Start the PlanetPress Suite Workflow Tools Configuration Program
- The PlanetPress Button
- Create a New Configuration
- Open a PlanetPress Suite Configuration File
- Saving and Sending a Configuration
- Save your Configuration
- Send your Configuration
- Import Processes from Another Configuration File
- Import Documents
- Import PrintShop Mail Documents
- Change the Interface Language
- Exit the PlanetPress Suite Workflow Tools Configuration Program
- The Quick Access Toolbar
- The PlanetPress Suite Ribbon
- The Configuration Components Pane
- Access Process Properties
- Add a PlanetPress Suite Process
- Manipulate Local Variables
- Activate or Deactivate a Process
- Convert a Branch to a Subprocess
- Manipulate Global Variables
- View Document Properties
- Use Data and Metadata Files Attached to Documents
- Use Attached Document Preview
- Add Resident Documents in the Configuration Components Pane
- Associate Documents and PlanetPress Watch Printer Queues
- Using the Clipboard and Drag & Drop
- Rename Objects in the Configuration Components Pane
- Reorder Objects in the Configuration Components Pane
- Grouping Configuration Components
- Expand and Collapse Categories and Groups in the Configuration Components Pane
- Delete Objects and Groups from the Configuration Components Pane
- The Process Area
- Zoom In or Out within Process Area
- Adding Tasks
- Adding Branches
- Edit a Task
- Replacing Tasks, Conditions or Branches
- Remove Tasks or Branches
- Task Properties Dialog
- Cutting, Copying and Pasting Tasks and Branches
- Moving a Task or Branch Using Drag-and-Drop
- Ignoring Tasks and Branches
- Resize Rows and Columns of the Process Area
- Selecting Documents in Tasks
- Highlight a Task or Branch
- Undo a Command
- Redo a Command
- The Plug-in Bar
- The Object Inspector Pane
- The Debug Information Pane
- The Message Area Pane
- Customizing the Program Window
- Preferences
- General User Options
- Object Inspector User Options
- Configuration Components Pane User Options
- Default Configuration User Options
- Notification Messages Preferences
- Sample Data User Options
- Network User Options
- PlanetPress Capture User Options
- PDF Text Extraction Tolerance Factors
- Logging User Options
- Messenger User Options
- HTTP Server Input User Options
- HTTP Server Input 2 User Options
- LPD Input Preferences
- Serial Input Service User Options
- Telnet Input User Options
- PlanetPress Fax User Options
- FTP Output Service User Options
- PlanetPress Image User Options
- LPR Output User Options
- PrintShop Web Connect Service User Options
- Editor Options
- Other Dialogs
- Working With Variables
- Data in PlanetPress Suite Workflow Tools
- Task Properties Reference
- Input Tasks
- Action Tasks
- Add Document
- Add/Remove Text
- Advanced Search and Replace
- Barcode Scan
- Change Emulation
- Create PDF
- Decompress File(s)
- Digital Action
- Download to Printer
- External Program
- Load External File
- Mathematical Operations
- Open XSLT
- PlanetPress Database
- Rename
- Run Script
- Send Images to Printer
- Search and Replace
- Send to Folder
- Set Job Infos and Variables
- SOAP Client Plug-in
- Standard Filter
- Translator
- Windows Print Converter
- Data Splitters
- Process Logic Tasks
- Connector Tasks
- Create MRDX
- Input from SharePoint
- Laserfiche Repository Output
- Lookup in Microsoft® Excel® Documents
- Microsoft® Word® Documents To PDF Conversion
- Output to SharePoint
- About PlanetPress Fax
- PlanetPress Fax
- Captaris RightFax Configuration
- About PlanetPress Image
- PlanetPress Image
- Overview of the PDF/A and PDF/X Standards
- PrintShop Mail
- PlanetPress Capture
- Metadata Tasks
- Output Tasks
- Variable Properties
- Unknown Tasks
- Masks
- Special Workflow Types
- Printer Queues and Documents
- PlanetPress Suite Workflow Tools Printer Queues
- Shared Printer Queue Properties
- Windows Output Printer Queue
- LPR Output Printer Queue
- FTP Output Printer Queue
- Send to Folder Printer Queue
- PlanetPress Suite Workflow Tools and PlanetPress Design Documents
- Variable Content Document File Formats: PTZ, PTK and PS
- PlanetPress Suite Workflow Tools and Printshop Mail Documents
- Triggers
- Load Balancing
- Location of Documents and Resources
- Debugging and Error Handling
- Using Scripts
- Index
Using Scripts
Scripts can be used to perform various operations, such as to manipulate data, for example. PlanetPress Suite Workflow Tools
can perform scripts written in four different scripting languages and also provides an interface for editing scripts.
While this chapter provides some very useful and detailed information about scripting within PlanetPress Workflow
Tools, its focus is to inform you about the features, variables and functions unique to this environment. This chapter
assumes that you have a working knowledge of the scripting language you wish to use and does not purport to teach-
ing you anything about this language that you don't already know. Learning any of these language is beyond the
scope of this documentation.
There are four scripting languages available through the Run Script task: JavaScript, VBScript, Python and Perl. Each lan-
guage has its own strengths and weaknesses which we will not cover in this documentation. While VBScript is the most used
language at the moment, the examples provided in this chapter are presented in all supported languages.
While JavaScript and VBScript are natively available on Windows operating systems. Python and Perl require third-
party tools to be functional. For Perl, ActivePerl can be installed. For Python, please see HOWTO-1504 in the Objec-
tif Lune Knowledge Base.
When using the Run Script as a condition, you need a way to tell your process whether the result is true or false. The condition
result is returned by the Script.ReturnValue variable. If the return value is zero (the default), the condition is false. Other-
wise, it is true.
When using the Run Script as an action task, the job file going out of the Run Script action task will be the same as the one com-
ing in, unless you have specifically changed it within your script by writing to the file that is the target of the Watch.Ge-
tJobFileName function. The same goes for any job info, local or global variables, unless you use the Watch.SetJobInfo or
Watch.SetVariable functions to modify them.
Multiple APIs (methods of communicating with the PlanetPress Workflow Tools scripting tools) are available through the script-
ing engine, in all languages.
l The Watch object is used to communicate with your current process and configuration. See The Watch Object.
l You can manipulate PDFfiles using the PlanetPress Alambic API. See AlambicEdit Library Reference. Note that the Plan-
etPress Alambic API is part of the PDFTools and is only available in PlanetPress Office and PlanetPress Production.
l You can manipulate the metadata in your process using the Metadata API. See Metadata API Reference.
l You can communicate with a SOAPserver using the SOAPAPI. See SOAP Server API Reference.
l You can communicate with the PlanetPress Capture Database using the Capture API. See Capture API Reference.
The Script Editor and XSLT Editor
How can I edit scripts and XSLT code?
Scripts can be edited in the Script Editor and the XSLT Editor. Both editors are visually identical and share almost exactly the
same commands. They let you import and export scripts, perform common editing function, such as search and replace, and
feature syntax highlighting and formatting.
You can use the Script Editor to edit scripts written in VBscript, JavaScript, Perl and Python (note that the corresponding inter-
preter must be locally available). You can use the XSLT Editor to edit scripts written in XSLT 1.0 and 2.0.
For information on how to use both editors, or for a complete description of the Script or XSLT Editor user options, refer to the
Reference Help (English only).
Using Scripts