2019.2

Table Of Contents
Adding a Control Script
To add a Control Script:
1.
On the Scripts pane at the bottom left, click the black triangle on the New button and click
Control Script. A new script appears in the list.
2. Double-click the new script to open it. The script editor appears.
3. Change the name of the script so that it reflects what the script does.
Note
Scripts can only have the same name when they are not in the same folder.
4. Write the script; see the "Control Script API" on page1351. If you are not familiar with
scripting, also see "Writing your own scripts" on page853.
Tip
New Control Scripts added to the template contain code to continue the page
numbering over all print sections, and two examples: one to select different sections
of a Print context for email and print output, and one to select a Web section.
What to use a Control Script for
Control Scripts let you change the way a template is merged, by giving access to the template
with all its contexts and sections in a script. A Control Script may, for example, omit, group and
clone sections; add a background to a Print section; or add a header to an email. A number of
the things that you can do with them is listed in the table below, with a link to a topic that
explains how to do it and that shows what the script should look like.
In a Control Script, section usually is the most important object. To get a quick overview and
lots of examples, see "section" on page1395. For help on specific tasks, see the table below.
Page 886