7.6

Table Of Contents
Furthermore, setting a Watch variable or job info from within the script will not return this value to the document, as
these values are always passed once when the document is called, never during execution.
Accessing Parameters from the script
The parameters value is a string which is sent to the executed script. It is available using the Script.Paramstring system var-
iable from within the code. If you want to send multiple parameters, you will have to separate them with a special character
and use this character as a separator to split the string or create an array with it, such as (example in JavaScript):
params = Script.Paramstring.split(";")
Code Example
ExecScriptFile('c:\myScript.vbs', 'name;'+@(1,1,10), 1)
Sample Scripts
2 sample scripts are available with any PlanetPress Suite installation.
They are are located in C:\Documents and Settings\All Users\Application Data\Objectif Lune\PlanetPress Suite N\Scripts,
where N is the PlanetPress Suite version number. These 2 sample scripts are used by PlanetPress Design's Excel Graph func-
tionality, allowing to insert a business graphic from a Microsoft Excel file.
ExpandString (function)
Returns a string that contains the data from a Workflow tool variable. Any variable available to the Workflow tool can be used
here.
Syntax
ExpandString(stringtoexpand: string) string
Arguments
stringtoexpand
The Workflow tool variable string to expand. This can be local and global variables, job infos, as well as any other variable
such as %o, %j, %y, etc.
Return Value
Returns the resulting expanded string.
Code Sample Example
define(&result, string, '')
&result = ExpandString("%{global.GlobalVar}")
show(&result)
% Also works with system variables
&result = ExpandString("%o")
show(&result)
©2010 Objectif Lune Inc - 485 -