Using ExtendScripts

You can develop your own ExtendScripts, register them to specific Templater Events, and have them execute when those events are broadcast by Templater. Within the ExtendScript file you register with Templater, we support methods that allow your code to access and manipulate Templater’s internal memory. This grants you access to things like the batch of jobs, specific job data, or layer data from within your code. See the Templater ExtendScript API for more information.

Sample ExtendScripts are available at Dataclay's code repository on GitHub.

ClosedRegistering ExtendScripts within the Preferences dialog

  1. In the Templater preferences dialog, in the Bot Settings group, click Setup ExtendScripts.
  2. Select a Templater event group to show available events associated with that group.

    NOTE  The Footage Processing and Footage Download event groups are only available in Templater 3.4 or later. Earlier versions show the Footage Retrieval event group instead.

  3. Enable a checkbox to specify whether your ExtendScript should run Before or After the chosen event. If the checkbox is cleared, the ExtendScript is disabled.
  4. In the text field below the checkbox, enter the absolute path to the ExtendScript. To have Templater enter the path for you, click Choose script… and navigate to the ExtendScript location, then click OK.
  5. To add ExtendScripts for other Templater events, repeat steps 2 through 4.
  6. When you are finished adding script information, click OK to register the ExtendScripts.

ClosedRegistering ExtendScripts within the CLI options file

In the templater-options.json file, in the bot object, set the specific event property to the absolute path of the ExtendScript file you want to run for that particular event. Refer to the following table for events that you can register an ExtendScript to in the bot object. For detailed descriptions of each event, see Templater Events.

Event in bot object Description Broadcast...
"pre_jsx_data" Before data ...before Templater retrieves data
"post_jsx_data" After data ...after Templater retrieves data
"pre_jsx_batch" Before batch ...before Templater's main iteration loop
"post_jsx_batch" After batch ...after Templater's main iteration loop
"pre_jsx_job" Before job ...before processing a single job
"post_jsx_job" After job ...after processing a single job
"pre_jsx_udpate" Before update ...before updating any layers
"post_jsx_update" After update ...after updating any layers
"pre_jsx_output" Before output ...before rendering any output
"post_jsx_output" After output ...after rendering any output
"enable_jsx" Bot enabled ...when Bot is enabled
"shutdown_jsx" Bot disabled ...when Bot is disabled