Monday, January 01, 2007


Installing and Running a Script

It is a surprise for me to discover that I've never actually written a blog entry on installing scripts. I guess I took it for granted that visitors here already knew how to do that! But just in case, and also because I need to have a description in a central location I can point people to, here is a capsule description of the process for InDesign CS2.

For InDesign CS2 to even be aware of a script, it must be located within the Scripts folder of the Presets folder of the Adobe InDesign CS2 application folder. Any scripts located in that Scripts folder or its subfolders are listed in InDesign CS2's Scripts Palette.

That's it in a nutshell, but there are some subtleties to watch out for and some common mistakes that people make.

Locating the Scripts Palette

Like most all of InDesign CS2's palettes, the Scripts palette is accessible from the Window menu, but it is not direcly in that menu. It is in the Automation sub-menu along with two other palettes, Data Merge and Script Label. When you activate the Scripts palette, you'll find that it shares space with the Script Label palette. I find this inconvenient and so I've separated the two into different groups. I have Scripts sharing space with the Hyperlinks, Bookmarks and Tags palettes, while the Script Label palette shares with the Pathfinder and Story palettes.

Installing a zipped script

If you download a script contained in a zipped (or stuffed) archive, the installation process is very simple. First, unzip (or unstuff) the archive. You'll find yourself either with the script file itself, by itself, or a folder containing the script and associated files. In the latter case, if any of those associated files is a read-me file of some kind or a user guide, be sure to read it and follow the instructions it gives—some scripts, for example, depend on other support files being located in particular places. But, if all you have is the single script file, then move or copy it to an appropriate subfolder of the Scripts folder, as described above.

Copying and Pasting the Source of a Script

Many scripts are posted on forums in the form of listings of their original source texts. To install such a script on to your computer, simply copy the text to a text editor of some kind or even better to ExtendScript Toolkit and then save the script file into a subfolder of the Scripts folder with a name of the form: ScriptName.jsx where "ScriptName" is a name you choose that reflects the purpose of the script. If you choose to use an application like Apple's TextEdit or Microsoft's Word, be sure to save as Plain Text (in the case of TextEdit, you have to use the Format menu to convert to Plain Text before Saving). Should you inadvertently save in some other format, your attempts to run the script will be frustrated by a syntax error message.

Beware the Plug-Ins/Script Folder

Do not put your scripts into the folder named Script within the Plug-Ins folder of the Adobe InDesign CS2 application folder. That's where the plug-ins that provide scripting support live. Any scripts you put into that folder will not appear in your Scripts palette.

Consider Using Aliased Sub-folders

Having scripts located physically inside the application folder can be somewhat inconvenient, particularly if you are a scripter, working on the scripts themselves, rather than just using them as tools. But even script users might be frustrated if they forget that the scripts are there and for some reason re-install InDesign, obliterating the Scripts folder in the process.

While you could use an alias of the whole Scripts folder to work around this issue, I have found it better to work with aliased sub-folders. This allows me to keep my scripts in folders inside my Documents folder, while for some projects, I have a Scripts folder associated with the project itself for custom scripts that apply to just that project.

SOO helpful, thanks! I found a bit of endnote code that you had posted on Adobe Forums here: This blog posting helped me find out where to put it and opened an entirely new InDesign world to me. Thanks!
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?