Adobe 27510753 Scripting Guide - Page 13
Scripting Basics, Introduction to scripting, What is scripting?
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 13 highlights
Adobe InDesign CS2 Scripting Guide Scripting Basics 5 2 Scripting Basics If you've used InDesign, you've worked with frames and their contents, and you've learned to apply colors, formatting, and styles. You've set up publications, spreads, pages, and the design elements on those pages. If you've done all of this, you've gotten used to thinking of an InDesign publication as a collection of objects. InDesign scripting uses the same approach. The core of InDesign scripting is the object model: a description of all the types of items-documents, spreads, pages, frames, and the contents of those frames-that can appear in an InDesign publication. Each type of object has its own special properties, and every object in an InDesign publication has its own identity. Not every InDesign user will be familiar with programming terms, concepts, and techniques, so this chapter provides introductory information to help get you started with scripting. It covers the basic concepts of scripting, or programming, for both Windows and the Macintosh. For more detailed directions on using your scripting system with InDesign, see Chapter 3, "Getting Started with InDesign Scripting." Experienced scripters might want to skip directly to that chapter. Introduction to scripting Scripting isn't only for software engineers-it's for every InDesign user. You don't need a degree in computer science or mathematics to write scripts that can automate a wide variety of common page-layout tasks in InDesign. If you can read this text, you can write InDesign scripts. What is scripting? A script is a series of commands that tells InDesign to perform a series of actions. These actions can be simple and affect only a single, selected object in the current publication; or complex and affect all of the objects in all of the InDesign publications on your hard drive. The actions might involve only InDesign, or they might involve other applications, such as word processors, spreadsheets, and database management programs. Virtually every task that you can perform by manipulating InDesign's tools, menus, palettes, and dialog boxes can be performed by a script. Scripting is a way to automate repetitive tasks, but it can also be a creative tool. In addition to performing routine production tasks, such as preparing a set of publications for remote printing, you can use scripts for creative tasks that would be too difficult or too time consuming to do yourself. For example, you could write a script to randomly change the font and color of the characters in a selection, or to gradually increase the size and baseline shift of characters from one end of a range of text to the other. Without scripting, you might not use these creative effects.