Understand how to create and execute ExtendScript scripts to automate repetitive tasks.
There are many tasks that you—as an author or publisher would perform on a regular basis. Such repetitive tasks can easily be automated in FrameMaker by using the powerful ExtendScript.
In this topic:
Scripting is a powerful tool that can be used to control and automate many features of Adobe FrameMaker—saving you so much time and effort that it can completely change the way you approach your work.
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 tells an application to perform a set of tasks. The trick is writing the statements in a language that the applications understand. FrameMaker support 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 TookKit (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 to be run.
Click Open. The script is run from within FrameMaker.