


Methods are actions you can apply on your bricks. For example, a document has a size and can have any number of pages a piece of text has color, font, and size and a color, in turn, has a color model (RGB, CMYK, or Lab) and a value for each of the components in this model. Properties are what gives the bricks shape, color, and weight. It’s important that you understand the hierarchy of objects, and that you’re clear about what object you’re “talking” to when you are scripting. Pages, in turn, contain text frames, which hold some of the stories’ text - etc., up to individual characters. “Above” the document, you can find things like master pages, pages, and stories. It lies on top of the application itself (also an object). Your document, for example, is one stone. Objects are the bricks that form the foundation of your document. The interface (how the script talks to InDesign) itself is made up of three parts: objects, properties, and methods.

Or, technically, something called ExtendScript, which is a flavor of Javascript that Adobe Creative Suite applications use. The language we’re going to focus on is JavaScript. There are two parts to a script: the language you write your script in, and the interface to InDesign. And of course, it’s fun to make InDesign do things the programmers didn’t think of. Scripting is also a good way to do accurate placing and to repeat the same action dozens, hundreds, or thousands of times. It can save lots of time: almost anything you can do with the user interface, you can do with scripts, and there are even a few things you can do in scripting that you cannot do from within the user interface. Scripting is one of the most powerful features in InDesign.
