7.5

Table Of Contents
Example
define(&x,integer,strtoint(@(7,4,8)))
if(&x < 1000)
execpage('PAGE1')
elseif()
if(&x > 1000)
%This is equivalent to execpage('PAGE3')
@PAGE3
elseif()
execpage('PAGE2')
endif()
endif()
ExecScriptFile (function)
Allows PlanetPress Design documents to execute the content of an external script file. The document waits until the script has
completed before resuming its own execution.
Note: This function does not support printer centric mode; results are undefined.
Syntax
ExecScriptFile(filename: string, parameters: string, scriptlanguage: integer) integer
Arguments
filename
Fully qualified path and name of the script to call and execute.
parameters
User-defined string value allowing a document to pass additional information to the script, such as data selections, PlanetPress
Talk variables, etc..
scriptlanguage
The programming language in which the script is written. The valid values are:
0 Auto-detect based on file extension: VBScript (.vbs) | JavaScript (.js) | Perl (.pl) | Python (.py)
1 VBScript
2 JavaScript
3 Perl
4 Python
Return value
Successful execution of the external script file will return 0 by default, although this value may be set by users through the
"Script (system object)" (page 249) system variable. Note that some negative values are internally used to indicate different
types of failure, always using negative values, which means conflicts may happen when users set the Script.ReturnValue var-
iable with an existing negative value. The proper practice is thus to return only positive values.
Here are the existing negative values:
©2010 Objectif Lune Inc - 275 -