Introduction:
Automation is the most significant aspect of efficiency, especially while dealing with large documents or monotonous formatting tasks in Adobe FrameMaker. Workflow automation can be greatly enhanced using various scripting languages such as JavaScript and FrameScript. In this post, we discuss how both tools can provide time and labor savings when used creatively within FrameMaker.
Why Automation Is Important in FrameMaker
Editing documents very manually in FrameMaker is tedious and susceptible to human error. Automating such tasks is, therefore, a dual blessing: It saves time and makes sure of consistency among the documents developed. Scripting is your good friend, whether formatting content, generating reports, or working on batch updates.
Introduction to Scripting in FrameMaker
FrameMaker has two major scripting technologies:
- JavaScript (ExtendScript)
- FrameScript
Both are great tools, but they are strong and weak in different areas and are appropriate for different kinds of automation.
JavaScript (ExtendScript) Application in FrameMaker
What Is JavaScript in FrameMaker?
JavaScript in FrameMaker is known as Adobe ExtendScript; this is a scripting language that is used for automation and customization associated with FrameMaker. Here are the scripts for various actions:
- Perform formatting of text for multiple documents.
- Create reports and summaries.
- Automate changes in the documents.
When Do You Use JavaScript?
JavaScript is particularly useful for:
- Actions that must be applied to many files
- Automating custom workflows
- Integrating with other Adobe tools
How to Access and Make Use of JavaScript
FrameMaker has an Extend Script Toolkit in which you can create, test, and run scripts.
Methods to Implement JavaScript in FrameMaker:
- Go to File > Scripts > Script Editor
- The Script Editor window will open, where scripting can commence.
- Write your script properly and implement things in real-time to check proper result.
What Next?
In the coming few paragraphs (or in the next blog article), we are going to describe FrameScript, another full-blown automation option for FrameMaker. It receives more native integration in FrameMaker and thus is perhaps likely to be chosen by users involved with FrameMaker-based publishing settings.
Example Use Cases
- Batch Processing: Suppose you have more than one DITA topic; then you can have a script go through all topics and take some predefined set of actions (like applying some custom styles, adding headers/footer, etc.).
- Automating Reports: Automate output reporting on documentation like producing a list of all the cross-references or links contained within the document.
- Custom Formatting: When you have a need for a uniform method of applying formatting to all your documents, JavaScript provides a facility to create custom rules and auto-apply them.
FrameScript in FrameMaker:
It is the scripting language of Adobe FrameMaker. FrameScript is Lisp-based, and though it’s slightly more specialized than JavaScript, it can be used to automate FrameMaker tasks.
How to Utilise FrameScript:
To utilise FrameScript, you usually employ FrameMaker’s scripting console or FrameScript files (.fs).
For the best result and workflows, you can employ FrameScript to control FrameMaker’s user interface, work with document structures, and automate content updates.
Example Use Cases:
- Batch Importing/Exporting Content: You can script FrameScript to import huge numbers of files or to export content in bulk in certain formats.
- Custom Navigation: Automate generation of custom navigation or table of contents from the structure of the document.
Final Thoughts
If you want to increase productivity and consistency in your documentation, the path to follow is learning to automate tasks in JavaScript on FrameMaker. In our next installment, we shall explore FrameScript in greater detail.
