InDesign & Illustrator Scripts

One of the great things about Adobe® InDesign® and Illustrator®, is their scriptability. We use InDesign and Illustrator scripting as part of many of our custom automation projects.

The time-saving scripts below are ones that we have written for friends or colleagues. They are available here for free, but If you like any of them, and would like to encourage us to make more available in the future, consider making a PayPal donation using the button below!

You don’t have to have a PayPal account to do so; a credit card is all you need.

Sandee Cohen’s Sort Tabbed Paragraphs Script


To deal with a question in her popular “InQuestion” column in the October/November, 2011 issue of InDesign Magazine, noted author and trainer, Sandee Cohen asked us to add some functionality to the “Sort Paragraphs” script which ships with InDesign as one of the example scripts. The original script sorts paragraphs based on the first word in the paragraph. Sandee had a need to sort paragraphs based on a particular “field” in a tab-delimited line. For example, rather than “Alan<tab>Smith” sorting BEFORE “Joe<tab>Jones” this script will make it sort AFTER if one specifies the sort to be done on the second “field” or “column.” (“Smith” comes after “Jones,” even though “Alan” comes before “Joe.”) So, we modified the original script to add that functionality. Check it out…

Download Sandee’s Sort Tabbed Paragraphs Script here.



The Adobe Illustrator CS5 Wow! Book scripts


Sharon Steuer and the team of authors and artists that created the recently released Peachpit Press book, “The Adobe Illustrator CS5 WOW! Book,” asked us to write two scripts to demonstrate concepts in two chapters: Rapid Reshaping and Scripting Colors.

The Artboard Resizer script resizes all artboards in a document by a specified factor, and the Artwork Colorizer script automatically fills shapes with different colors—very useful for mapmakers, etc.

You can download the scripts, along with instructions on how to install them on both Mac and Windows here.

Download the WOW! scripts here





Sandee Cohen’s Show/Hide Buttons Script


 

A while ago, Sandee Cohen asked us to write a script . She really wanted a script to simplify a multi-step process she uses many times in some of the documents she creates—setting up one object (the “trigger”) as an InDesign interactive button to show and hide another object (the “target”) in a PDF or SWF when the user mouses in and out of the “trigger.”

Here’s what Sandee has to say about the result:

Anyone who has ever created a disjointed rollover with InDesign’s Show/Hide commands knows what a confusing set of steps it takes. Premedia's script not only takes away the cumbersome steps, it saves me hours of work checking and rechecking all the settings. And the script is very simple to use. Just select your buttons and run the script. You choose the trigger and the target gets set automatically. This is the interface that Adobe should have given us! If you have to make more than 5 Show/Hide commands in a document, you owe it to yourself to buy and use this script.

–Sandee Cohen, Vectorbabe.com

Download Sandee’s Show/Hide Buttons script here.

Bay Area InDesign User Group Scripts


We gave a presentation on scripting at the July meeting of the Bay Area InDesign User Group. We asked those in attendance for script ideas, and then had them vote on which would be most useful. We took the two ideas with the most votes, and developed them into working scripts which we're making available here. (Scroll to the bottom of the page for download links.)

Shadow-Matic

Shadow Matic ScreenshotThe suggestion with the most votes was for a script to automate a way around the fact that InDesign does not honor the blending mode of Photoshop layers, sometimes complicating the task of creating shadow effects. This script will create an image “sandwich” with two copies of the same image, one on top of the other. The bottom image is set with a blending mode of “Multiply,” and the other—positioned on top of the first—is set with a blending mode of “Normal.” The two images are then grouped together.

The script takes a selected image, and displays a dialog box allowing you to select which layers and/or clipping paths to use for the shadow portion of the image, and which to use for the "normal" image.

Download the Shadow-Matic Script here.

Lock/Unlock All Page Items

The suggestion with the second most votes was for a script to quickly lock or unlock all page items. The script displays a dialog in which you select whether to lock or unlock all page items, and whether it should apply that choice to the current spread or the entire document.

Download the BAIDUG Lock/Unlock All Script here.

InDesign Script Installation

To use any of the InDesign scripts, unzip the downloaded file, and place the resulting .jsx file in the “Scripts Panel” folder which is inside the "Scripts" folder which is inside the Adobe InDesign application folder. This will make the script appear in the Scripts Panel (Window > Automation > Scripts). Find the script you want to run in the “Application” section of the Scripts Panel, and double click it to run it.