2022.2

Table Of Contents
Enable/disablescripts
Adisabledscriptwillnotrunatallwhenthetemplateismergedwitharecordsettogenerateoutput.Dis-
ablingscriptexecutionincertaincontextsorsectionshelpswithperformance,sincescriptsnormally
run,whetherornottheirplaceholderorselectorispresentinyourtemplate.Itishighlyrecommendedto
disableanyscriptthatisnotrelevanttospecificsectionsorcontexts.
Whenyoudisableafolder,allscriptsinthefolderwillbedisabled.
Toenableordisableascriptorafolder:
l
OntheScriptspane,right-clickthescriptorthefolderandclickDisable(ifthescriptorfolder
wasenabled)orEnable(ifthescriptorfolderwasdisabled).
Tip: Formorewaystooptimizescripts,see"Optimizingscripts"onpage820.
Import/exportscripts
TheeasiestwaytoimportscriptsintoanothertemplateistoopenthetemplateandusetheImport
Resourcesdialog;see"ImportResourcesdialog"onpage889.
Rememberalsotoimportoraddanyfilesthatascriptrefersto.
Alternatively,scriptscanbeexportedorimportedviatheScriptspane.
Toexportascript:
1. OntheScriptspane,clickonascript,andthenclicktheExportbutton,orright-clickascriptand
selectExport.
2. GivethescriptanameandclickOK.
Toimportascript:
l
OntheScriptspane,clicktheImportbutton.FindthescriptandclickOK
Filesthatascriptmayreferto,suchasimages,snippetsandfonts,arenotexportedorimported
togetherwithascript.
Testthescripttomakesurethatallfilesarepresentinthetemplateandthatthescript'sselector
matchessomethinginthecontentofthetemplate;see"Testingscripts"below.
Testing scripts
Thequickestwaytotestthatscriptsworkasexpected,istoclickthePreviewtabatthebottomofthe
workspace.
Youcanevendothiswhilecreatinganewscript,eitherwithaScriptWizardorintheexpandedscript
editor.ClickApplyatthebottomofthescripteditortoseetheeffectofthescriptonthePreviewtabof
theDesigner.
Page 816