2018.1

Table Of Contents
It is worth the effort, however, to familiarize yourself with the JavaScript syntax. For a simple
script all you need to know can be found on the following web pages:
http://www.w3schools.com/js/js_syntax.asp and http://www.w3schools.com/js/js_if_else.asp.
In the editor window, press Ctrl + Space to see the available features and their descriptions.
Use the arrow keys to select a function or object and press Enter to insert it in the script.
Type a dot after the name of the function or object and press Ctrl + space again to see which
features are subsequently available.
For more keyboard shortcuts, see "Keyboard shortcuts" on page816.
Designer API
The "Designer Script API" below describes the objects and functions that are available in
template scripts, created inside the Scripts pane. Template scripts change the contents of
sections in a template.
Note
In a Print context, the scripts in the Scripts pane run once for each section and once for each Master
Page (see "Master Pages" on page404).
Control Script API
Control Scripts are a special kind of Designer Scripts. They don't touch the content of the
sections themselves, but they change the way a template is outputted, for example by selecting
or omitting sections from the output.
For more information about Control Scripts and their use, see "Control Scripts" on page711.
Features that are specific to Control Scripts are listed in the "Control Script API" on page1077.
Designer Script API
This page lists the global objects and functions that are available in scripts, created inside the
Scripts pane. Click through to an object or function to get a description and examples.
If you are not familiar with writing scripts, see "Writing your own scripts" on page689.
Page 1021