Running Scripts

We’ve seen two methods of running scripts. The first method was to run a script from the Scripts panel in InDesign (CS5: Window → Automation → Scripts; CS3/4: Window → Automation → Scripts). Both these methods are fine, but if you need to run a script very often, a third method is useful: assign a keyboard shortcut to the script. Here’s a short description of how to do that. Go to the Keyboard Shortcuts dialog (Edit → Keyboard Shortcuts). In the Product Area drop-down, choose Scripts, which displays all of the scripts. You’ll see several folders; the folder you want is most probably the one called “Users.” Highlight the script you want to assign a shortcut to and assign it in the normal way, as you would to any other InDesign menu or panel item. The script can then be run simply by pressing that shortcut key. See the box Trick: Running Scripts Really Quickly on Trick: Running Scripts Really Quickly for an application. Finally, a convenient way to run scripts is to start them from a small dedicated dialog: see http://www.kahrel.plus.com/indesign/runscript.html.

For an unrivalled replacement for InDesign’s Script panel, see Harbs’s Scrip Bay. This is a general CS script palette from which you can run InDesign, PhotoShop, Illustrator, etc. scripts.

Get Scripting InDesign CS3/4 with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.