Chapter 10. Scripting the Unscriptable

Scripting the Unscriptable

Bill of Materials

Mac OS X Software

  • Script Editor (/Applications/AppleScript)

  • Terminal (/Applications/Utilities)

  • TextEdit (/Applications)

  • Property List Editor (/Developer/Applications/Utilities)

  • Stickies (/Applications)

I cannot think of any better witness to the tenacity of the human spirit than a stubborn insistence that we can do exactly that which other people suggest we cannot. Is an application unscriptable? Figure out how to script it. Are the core system commands limited? Figure out how to expand them.

This entire chapter grew from a few minutes of random “Can I do that?” investigation into a couple of weeks of rabid, obsessive exploration. In the sections that follow, you’ll discover how to work with, take command of, and ultimately expand the possibilities of application scripting via the script suite and script terminology files introduced in the previous chapter. By the time you finish this chapter, you’ll be able to script your applications to do a lot more things than they were able to do when you started.

Activating Application Scriptability

Mac OS X Panther offers a useful little utility called Stickies. This application lets you add virtual Post-It Notes to your workspace so you can keep notes and reminders within reach. With Stickies, you can add a note, specify its color, and add text and graphics. Unfortunately, the program doesn’t ...

Get Modding Mac OS X 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.