O'Reilly logo

Running Mac OS X Tiger by James Duncan Davidson, Jason Deraleau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scripting

In addition to Automator, Mac OS X has several scripting languages to help you automate tasks on your machine. At first glance, creating your own scripts may seem like a daunting task. The goal of this section is to take some of that dread away by introducing you to scripting in a friendly manner. There are some concepts that can

The Confidential Watermark workflow

Figure 13-11. The Confidential Watermark workflow

be a bit hard to grasp at first, especially if you’ve never programmed before. But with a bit of luck and some know-how gained from the following sections, you’ll be writing your own scripts in no time.

Scripting Languages

Picking a scripting language can be one of the most difficult parts of scripting, especially when you have as many choices as those supplied by Mac OS X. Sometimes, a certain language just works better for a job. For example, when you’re working with text, Perl will prove much more versatile than AppleScript. It’s the nature of the language—its included features and functions—that helps you determine if it’s up to the task.

Mac OS X comes with quite a few different scripting languages: Perl, Python, Ruby, AppleScript, C shells, Bourne shells...the list goes on. Some of these languages are much more sophisticated than others. Entire books have been dedicated to each, but in this chapter, we’re just going to dabble with two: AppleScript and Bourne shell (that is, bash) scripting. These ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required