2020.2

Table Of Contents
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. (See
"Managing scripts" on page860.)
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 (all at the same time, or one by one - see
"Setting the scope of a script" on page860), 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.
l
A selector (HTML/CSS):
n
HTML elements of a certain type, such as a paragraph: <p>. In the Script
Wizard, click Selector and type the HTML tag in the Selector field without the
angle brackets: p.
n
HTML elements with a specific CSS class (eg. green). In the Script Wizard,
click Selector and type the class name in the Selector field, preceded by a
dot: .green.
n
An HTML element with a specific ID (eg. intro). In the Script Wizard, click
Selector and type the ID in the Selector field, preceded by #: #intro.
In an HTML file, each ID should be unique. This means that a particular ID can
be used only once in each section.
n Etcetera. See https://www.w3schools.com/cssref/css_selectors.asp for more
selectors and combinations of selectors; also see "Selectors in Connect" on
page875 for selectors that can only be used in Connect.
l
A selector and text. This is text inside an HTML element (or several HTML
elements) with a specific HTML tag, CSS class or ID. In the Script Wizard, click
Selector and Text.
Page 856