2019.2

Table Of Contents
Scripts can be exported and imported via the buttons or through drag & drop between the
Scripts pane and any location on the computer.
Note
Scripts included on the Scripts pane are completely distinct from the JavaScript resources found in
the "Resources pane" on page1037 (see "Using JavaScript" on page564).
Think of scripts as server-side in the sense that they are executed through the Connect modules
(Server and Content Creation especially). Scripts have access to the whole PlanetPress Connect
JavaScript API (see "Standard Script API" on page1287), such as the record object.
JavaScript resources, on the other hand, are only executed after the content creation is done,
generally in a browser.
Buttons
l
Import...: Click to open a standard Open dialog to import a script. The script must have
the .OL-script extension.
l
Export...: Click to open a standard Save As dialog to save the currently selected scripts to
disk. These scripts can be re-used in other templates. If more than one script is selected,
they are all saved to a single file. If some scripts are inside folders, this folder structure is
kept and will be restored when the scripts are imported.
l
New: Displays a drop-down that shows the following options:
l
Control Script: A Control Script affects the output of a template per record as a
whole, instead of parts of the content. See "Control Scripts" on page885 and
"Control Script API" on page1351.
l
Standard Script: Adds a new empty standard script. Double-clicking the new script
opens the script editor, where you can write code (see "Writing your own scripts" on
page853).
Tip
Select Text Script instead of Standard Script to create a Standard script that
is opened with the Script Wizard.
Page 1045