FrameMaker ExtendScript: Getting Started

With Adobe FrameMaker 10, support for ExtendScript has been added where in ExtendScripts can now be used to automate and extend FrameMaker. FrameMaker has exposed its object model which can be used to manipulate FrameMaker objects like documents, paragraphs, formats etc. The Object Model is documented in an xml file that can be downloaded from “http://www.adobe.com/devnet/framemaker/articles/10.html” and viewed in Object Viewer Model.

Please find attached a small presentation which introduces basic elements of ExtendScript, Tools for writing ExtendScript and FrameMaker’s support for the same: FrameMaker ExtendScript Basics

View video in a new browser window.

Also to help in getting started with writing scripts, FrameMaker ships some working ExtendScript examples with the product which can be accessed at “<FM_INSTALL_DIR>\Samples\ScriptsAndUtilities”. These are small scripts that can help you get started on writing ExtendScripts. The sample scripts covers:

  1. Hello World: This is a simple one line script to show how to show an Alert dialog using script.
  2. Suppress Alerts: This script uses notifications to suppress all FrameMaker alerts. In this script, you can learn on how to use notifications.
  3. Conditional Text: This script contains a sample that generate different PDF’s by applying different conditional text. In this script, you can learn on how to work on books, call Show Hide Conditional Text functionality, generate PDF etc.
  4. Hierarchical Books: This scripts traverses through the books Folder and Group hierarchy and logs the details in a text file. In this script, you can learn on how to iterate over Book files.
  5. Flatten Conrefs: This script flattens all the conrefs present in all the topic refs of the Active Ditamap/Topic. In this script, you can learn on how to work on DITAMap, call text Inset functions (as conref are implemented as TextInset), add menu commands, write command handlers etc.
  6. Read XML: This script show usage of XML object to read XML file.

We will be uploading a script every week on blog to show more use cases and provide sample scripts which can be used as it is or as a starting point for writing scripts for specific needs. Look out for “ExtendScript Of the Week” entry on our blogs starting next week.

Regards,
Rajat Bansal
Adobe FrameMaker Team