Why Would You Want to Script?
The phrase "to automate repetitive work" has become the mantra of the "scripterati," and I've used the phrase as much as anyone. But I've begun to think it probably causes people's eyes to glaze over. Instead, I've started comparing writing and running scripts to text messaging: Like text messaging, scripting uses its own language, is text based, and is often used to get the entity on the other end to do something (such as answer a question or complete a task). Sending someone a message in text form is often faster than talking to that person face-to-face; the same is true for scripting.
Scripting is the most fascinating of all the graphics automation tools. Opening a portal into the inner workings of the familiar graphics applications that designers know and sometimes love, scripting gives designers newfound power over their workspaces. For those of a certain bent, it also provides an entree into the exclusive clubhouse of programming. Like preparing gourmet cuisine or building a robot, scripting involves assembling parts, tinkering, experimenting, and testing.
In addition to automating soul-draining repetitive tasks, scripts can be used to:
- Perform jobs that are difficult or time-consuming to do manually, such as sorting large lists
- Set up self-running automation agents that respond to requests or react to situations
- Make multiple applications act in concert—for example, automatically editing an image in Photoshop and then placing it in a brochure layout in InDesign
- Create "watched folder" systems that trigger a script when files are added to a folder (AppleScript)
- Add logic to automated agents
- Perform complex calculations automatically
- Serve as a stepping stone to building actual applications (AppleScript and AppleScript Studio)
- Ease the process of learning more complex programming languages
- Write custom Automator actions (AppleScript)
Although you can use scripts to perform small single tasks, that's not what they're generally used for. Since creating, testing, and maintaining scripts is a more involved process than using Creative Suite actions or general productivity tools like QuicKeys, scripts tend to be reserved for longer, more complicated workflows.