2019.2

Table Of Contents
Tip
Content added by a script isn't visible in Design mode, but is visible and can be inspected in
Preview mode.
Post Pagination Scripts
Post Pagination Scripts are run in a Print context after the content has been paginated.
Because they can search through the output of all Print sections, and modify Print sections (one
at a time), they may be used to create a Table Of Contents (TOC), as explained in the topic:
"Creating a Table Of Contents" on page902.
For more information see "Post Pagination Scripts" on page900.
Creating a new Standard Script
Writing a Standard Script starts with this procedure.
1.
On the Scripts pane at the bottom left, click New. A new script appears in the list. Double-
click on it to open it.
2. 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.
3.
Choose which kind of selector you want to use. Running a Standard Script starts with
searching the template for pieces of content that match the script's selector. The collected
pieces of content are passed on to the script, so that the script can modify them.
The selector can be:
l
Text, for example: @lastname@, or {sender}. The text doesn't have to have any
special characters, but special characters do make it easier to recognize the text for
yourself. In the Script Wizard, click Text and type the text to find.
Page 855