What's So Great about AppleScript? (MacBook)

If one word could describe what AppleScript is all about, it’d be automation. AppleScript is a technology for automating practically any action that you perform with your MacBook, including both common tasks in the Finder and those that you perform in other applications.

Automate common tasks in the Finder

If you’ve ever found yourself repeating some task more than once, you’re an ideal candidate for becoming an AppleScript techno-wizard. AppleScript is particularly good at taking the boredom and tedium out of using your laptop by performing all sorts of tasks automatically. To illustrate, consider a few jobs that would take a fair amount of time to do by hand but are a snap with AppleScript:
♦ While writing your next best-selling Great American Novel — or For  topic on Mac OS X — you make a mistake and misnumber the topics. All the topics have a filename bearing the topic number, but they’re all off by one. Sure, you could rename each file by hand, but your topic is a large tome and renumbering 42 topics manually doesn’t sound like much fun. (Take my word for it. Please.) It’ll require several minutes and lots of tedious attention on your part, not to mention introduce the likelihood of human error. But wait, there’s another way! When using a simple AppleScript of only a few lines of code, you can rename the topics in seconds whilst you go grab another Diet Coke.
♦ You’re a neat individual and think that your MacBook should reflect your penchant for order — in fact, you like your Desktop icons to be placed just so. Being left-handed, you prefer the icons over on the left side of the Desktop, like some of those inferior operating systems. In this situation, an AppleScript can help you do things that aren’t humanly possible; not only can you rapidly rearrange the icons on your Desktop, but you can do so with pixel-point accuracy. Without AppleScript, it’d be nearly impossible to precisely align dozens of icons. And if you could, it would take a long time and probably cause you to go blind.
♦ After a font-download binge, you find yourself with hundreds of fonts. You really want to organize them into separate folders based on the date that you downloaded them. AppleScript comes to the rescue again! With a brief script, you could knock out this challenge without ever looking at a single date. Add a couple more lines of code to the script, and AppleScript will take care of creating the folders, too. Right, you know the word: sassy.


Automate tasks in other applications

By using AppleScript, you can also often automate your work from beginning to end, despite the fact that you need multiple applications to do so. Look at a few scenarios, and you’ll begin to appreciate why AppleScript is such a powerful technology:
♦ You’ve just completed creating the ultimate library of bagpipe songs in iTunes — no, really! — and you want to share the list with your friends at the next Bagpipers Anonymous meeting. You could easily send everyone in the group an iTunes Playlist, but not everyone in the club has a Macintosh, let alone a computer. This is going to require creating a hard copy for those members without a computer. Because your bagpipe song list contains thousands of songs, you don’t want to retype the name of each song. AppleScript can save the day by extracting the song titles for you and compiling them into a list just in time for your meeting.
♦ AppleScript can take care of your computer-owning bagpipe friends, too. With a few extra steps, you can e-mail all of them the list as well.
♦ Being so doggone fond of bagpipes, you want to send your bagpiping friends a special note during the holidays. To help manage your holiday greeting cards, you can create a record in FileMaker Pro or some other database listing the name and address of each person who should receive a card. If you’ve entered their street addresses in the Contacts section of your e-mail application, AppleScript can aid in transferring the addresses from your e-mail application to the database. Never again will your bagpiping friends miss a holiday greeting . . . and the world is a much better place.
As you can imagine, there are literally thousands of ways that you can use AppleScript to automate your workflow. (Whoops, I just used a BST, or Business Software Term. A workflow is a single document or project that one or more people work on using multiple applications. In other words, your document can be automatically manipulated in multiple applications using the same script.)

Next post:

Previous post: