2022.2

Table Of Contents
viousrecord.Thisisbydesign.Itallowsyou,forexample,tomaintainarunningtotalacrossall
recordsofajob.
PostPaginationScripts
PostPaginationScriptsareruninaPrintcontextafterthecontenthasbeenpaginated.Becausethey
cansearchthroughtheoutputofallPrintsections,andmodifyPrintsections(oneatatime),theymay
beusedtocreateaTableOfContents(TOC),asexplainedinthetopic:"CreatingaTableOfContents"
onpage852.
Formoreinformationsee"PostPaginationScripts"onpage850.
Creating a new Standard Script
WritingaStandardScriptstartswiththisprocedure.
1. OntheScriptspaneatthebottomleft,clickNew.Anewscriptappearsinthelist.Double-click
onittoopenit.
2. Changethenameofthescript,sothatitreflectswhatthescriptdoes.
Note: Scriptscanonlyhavethesamenamewhentheyarenotinthesamefolder.(See
"Managingscripts"onpage814.)
3. Choosewhichkindofselectoryouwanttouse.RunningaStandardScriptstartswithsearching
thetemplateforpiecesofcontentthatmatchthescript'sselector.Thecollectedpiecesofcontent
arepassedontothescript(allatthesametime,oronebyone-see"Settingthescopeofa
script"onpage813),sothatthescriptcanmodifythem.
Theselectorcanbe:
l
Text,forexample:@lastname@,or{sender}.Thetextdoesn'thavetohaveanyspecial
characters,butspecialcharactersdomakeiteasiertorecognizethetextforyourself.In
theScriptWizard,clickTextandtypethetexttofind.
l
Aselector(HTML/CSS):
n
HTMLelementsofacertaintype,suchasaparagraph:<p>.IntheScriptWizard,
clickSelectorandtypetheHTMLtagintheSelectorfieldwithouttheanglebrackets:
p.
n
HTMLelementswithaspecificCSSclass(eg.green).IntheScriptWizard,click
SelectorandtypetheclassnameintheSelectorfield,precededbyadot:.green.
n
AnHTMLelementwithaspecificID(eg.intro).IntheScriptWizard,clickSelector
andtypetheIDintheSelectorfield,precededby#:#intro.
Page 810