Uses for AppleScript
Of course, what really matters is what you can
do with AppleScript. The answer? Just about
anything you can do yourself.
AppleScript is a language with which you create individual
scriptslittle software robots that send
commands to different programs on your computer. In fact, scripts do
much of what you can do with a keyboard and mouse.
"But why should I learn an entirely new language
just to do the things I do myself?" you ask.
Luckily, AppleScript has several advantages over a human computer
user:
AppleScript eliminates repetitive
jobs. One of AppleScript's greatest
strengths is its ability to automatically perform similar jobs over
and over again. With AppleScript, you can automatically rename all
the files in a folder (Chapter 6), save all your
open TextEdit documents at once (Chapter 5), or
rate every song in your iTunes library (Chapter 8), for example. Best of all, AppleScript will
never get repetitive stress disorderor complain that
you're making it work too hard. AppleScript automates complicated
workflows. Another great ability of AppleScript is
managing jobs that take place in multiple programs. For instance,
AppleScript can take a picture from the Finder, bring the image into
Photoshop, correct color tones, and shrink the file down to a
suitable size for a Web site, all without breaking a sweat (Chapter 7). AppleScript can do stuff in the
background. Sometimes you might want to have a program
that works without you asking, and AppleScript can do that too. If
you have a screensaver running, for example, AppleScript can
automatically set your iChat status to Away without you having to
touch your keyboard or mouse (Chapter 9). AppleScript works even when
you're not. If you're on
vacation, AppleScript can take over some of the jobs
you'd normally do yourself. For instance, you can
create a simple AppleScript that automatically puts excess junk from
your Desktop into a different folder (Chapter 5). AppleScript's much faster than
you are. Unless you're some sort of
computational Superman, AppleScript is always faster than you; while
it might take you 10 minutes to rename all the files in your
Documents folder, for example, AppleScript can do it in less than 10
seconds.
Up to Speed The Meaning of "AppleScript" | The term AppleScript causes some confusion,
mainly because it can be used as virtually any part of speech.
Originally, it referred to a language, just like
English, Swahili, or
Java. Later, AppleScript
became a more general noun, referring to any program written in the
language. Nowadays, you'll hear people refer to an
AppleScriptable program (one that can be
controlled by AppleScript), or the task of
Apple Scripting (using AppleScript to accomplish a
job). In some circles, you'll even hear it used an
expression of nerdy surprise ("Why,
I'll be AppleScripted!"). Keep in mind, too, that the word script has
similar connotations. When it comes to AppleScript, a
script is a document written in the language,
and scripting is the act of writing such a
script. |
|