CS3 and the easy way to learn scripting

InDesign CS3 contains sample scripts that you can view, test, and use right now. Not only can you run these Applescripts and Javascripts on your own Mac, you can open them up and see how they work.

InDesign CS3 includes 21 sample scripts in both Applescript and Javascript (and Visual Basic on the PC). You can test these on your own by opening the scripts palette—Window-> Automation-> Scripts—and double clicking on the script you want to test. Adobe provides information in the readme about each script. Here are some of my favorites with some tips for using them:


Adds Guides around a selected object. Great for creating templates from existing files. The Guides go on their own layer. Try it on a select group too.


Adds points to a selected object. This is a quick way to create shapes and change runarounds and wraps.


This script adjusts Right and Left pages by a specified distance. Good for fixing a file when someone forgot about 3-hole drilling.


This script aligns selected objects to a specified position on a page. Use this one for adjusting single pages when creating a 6-page brochure.


When creating a new character style it is nice to have everything filled in for you. Just select your text and run the script.

ImageCatalog and LabelGraphics

These are great and they can be used together. Create a catalog of images and then bring in the information and properties you have in the files (XMP data).


Choose a PDF and it adds a new page as it goes along and places each PDF page starting at the top left. I have been using the PlaceMultipagePDF Applescript and have discovered some easy variations on it. If you have a folder of TIF pages or a folder of JPG pages, just combine them into one PDF using Acrobat. You can put them in order before saving the PDF, then just use the script to create your document in Indesign.

You can add pages to an existing document as well: the script asks what page you want to start on and places the pages from there. You may never type “Command D” again.

If you are interested in modifying these for your own workflow or just wanting to see how they work, Creative Suites 3 ships with a program called ExtendScript ToolKit. This allows you to open both Javascripts and Applescripts to view and test. Applescripts also open in the Script Editor that comes with Mac OSX. If you choose edit script from the Palette Menu one will open for you. All scripts are available in both Javascript and Applescript so you can compare the scripting methods and decide which one you would like to work with.

Adobe has information on their website to help you get your feet wet in designing your own custom scripts: http://wwwimages.adobe.com/www.adobe.com/products/indesign/scripting/pdfs/indesign_cs3_scripting_tutorial.pdf. It is an excellent tutorial for Creative Suites users wanting to learn more about scripting.

Andrea Mahoney writes custom scripts for Creative Suite and other Mac applications using Applescript and Javascript.