Three Scripting Languages
Made by Apple (who else?) and only capable of running on Macs, AppleScript's claim to fame is its similarity to the English language—which should make it easier to learn than other scripting languages. Like all marketing claims, however, this one should be taken with a healthy dose of skepticism. Like English, AppleScript also can be convoluted, offers many ways of saying the same thing, and at times makes absolutely no sense (at least to me).
On the plus side, a wealth of AppleScript learning resources and free scripts for Creative Suite are available. What's more, if a Macintosh graphics program supports scripting, it probably supports AppleScript. Plus, you can use AppleScript to control multiple applications simultaneously; it is a relatively easy scripting language to start learning; and nonprogrammers will find it easier to get the gist of what AppleScript is saying and doing than with the other scripting options.
Which Scripting Language Should You Choose?
Here are my guidelines for choosing a Creative Suite scripting language:
- If you spent all of your parents' money on a liberal arts education, you'll probably be most comfortable with AppleScript.
- If you're familiar with Visual Basic, shake hands with VBScript.
The scripting language you choose will likely depend more on preexisting factors and personal tendencies than any rational criteria. I chose AppleScript because it came free on my Mac, and I was in a culture that supported AppleScript. It was covered in the design magazines I already read, people I knew were dabbling in it, and programs I used to make my living were AppleScript-able. Now that I've been using AppleScript for awhile, I can use it to write Automator actions and full-blown Macintosh applications with AppleScript Studio—but these capabilities are just gravy.
I've chosen AppleScript for the simple tutorial later in this chapter because it tends to be easier for newbies to follow, and those familiar with either of the other languages shouldn't have any problem translating.