Understand how to create and execute ExtendScript scripts to automate repetitive tasks in Adobe FrameMaker.
Scripting is a powerful tool to control and automate many features of Adobe FrameMaker. Scripting in FrameMaker is based on Adobe ExtendScript. It is a dialect of the ECMAScript 3 standard and, therefore, similar to JavaScript.
Your work is characterized by creativity, but many of the actual hands-on tasks are anything but creative. Most likely, you spend much time doing the same or similar procedures over and over again. Would it not be great to have an assistant—one that happily does the mind-numbing tasks, follows your instructions with perfect and predictable consistency, is available any time you need help, works at lightning speed, and never even sends an invoice? Scripting can be that assistant. With a small investment of time, you can learn to script the simple but repetitive tasks that eat up your time. However, while it’s easy to get started, FrameMaker scripts provide the necessary depth to handle sophisticated jobs. As your scripting skills grow, you may move on to more complex scripts that work all night while you’re sleeping.
A script is a series of statements that tell an application to perform a set of tasks. The trick is writing the statements in a language that the applications understand. FrameMaker supports ExtendScript as its scripting language.
There are two ways of running scripts: from within FrameMaker and by using the ExtendScript Toolkit (ESTK).
FrameMaker includes a menu entry that makes it easy to create a script with the ExtendScript Toolkit (ESTK).
To create a script:
Click
.Compose your script in the ExtendScript Toolkit (ESTK) that is opened.
Save the script. Either run the script from within ESTK or run it from within FrameMaker.
FrameMaker includes a menu entry that makes it easy to run scripts.
To run a script:
Click Choose Script... dialog is displayed.
. TheIn the Choose Script... dialog, select the script type ( *.jsx, *.js, *.jsxbin) to be displayed in the file list.
Select the script that you want to run.
Click Open. FrameMaker runs the script.