7.4

Table Of Contents
Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are
related more to the system than to PlanetPress itself. Some examples would be W3813, W3830, W3991, W4005. These cor-
respond to issues such as not having any space to write files, permission errors on folders or files, etc.
Run Script
Run Script tasks are used to run scripts that typically perform some kind of processing on the job file received by the task.
Scripts are often simpler to write than programs added with the External Program action (see External Program). However,
they can be slower to execute.
The Run Script action task can be used either as an action or a condition. When dragging and dropping a Run Script action task
on a given process, you select whether to use this task as an action or a condition from a contextual menu.
For more information on scripts, what languages are supported and how to write scripts and conditions, please see the related
chapter, Using Scripts.
Input
Any data file, in any format.
Processing
The script is executed. The script can modify anything such as the data file, job infos, metadata, or even other files on the oper-
ating system.
Output
Whatever file the Run Script action generates, metadata it modifies or creates, etc.
Note about conditions:When using Run Script as a condition, the output of the task can be within the branch or on the
main trunk. To control the output, use the Script.ReturnValue variable in your script.
Run Script action task properties are as follows:
The ScriptEditor menu options are as followed:
l File
l Import:Lets you open an existing script froman external file. This file can be in .vbs, .js, .pl or .py for lan-
guage-specific scripts, or .txt for any of them.
l Export:Lets you save the currentscript as a file.
l Print:Prints the currentscript.
l Edit
l Undo:Undo the last edit.
l Cut:Cut the current selection (only available if there is selected text in the editor).
l Copy:Copy the current selection (only available if there is selected text in the editor).
l Paste:Paste the last selection that was cut or copied in the location of the cursor in the text editor.
l Delete:Delete the current selection (only available if there is selected text in the editor).
l Select All:Select all of the contents of the editor.
l Search
l Find:Brings up the Find dialog.
l FindAgain:Repeats the previous search and finds the next occurrence.
l Replace:Brings up the Replace dialog.
l Go To Line: Brings up the Go To Line dialog where you can enter a line number and jump directly to that line.