Blog Archives

Learning AppleScript can be frustrating. You need a good book, lots of patience, and core documentation like the AppleScript Language Guide and the annual release notes, but most of all you’re going to need access to instant advice. It’s in this last respect that we’re going to build a helpful little AppleScript tool to help us solve AppleScript problems.

The two best places to get help from are Apple’s AppleScript mail list and MacScripter. So, basically, we’re going to combine a couple of tools that you’ve already got (or can get for free) on your mac into a single keystroke-activated, dedicated search engine. When finished, we’ll be able to do something as simple as pressing cmd-ctl-S, type in a short search term like “display dialog” and get specific results for AppleScript.

Our tool basically relies on that fact that in Google you can do site specific searches by using the site: keyword. We’ll then add a couple of AppleScript-specific choices and use a free tool, Red Sweater’s FastScripts, to allow us to assign an easy shortcut (you could assign the keyboard shortcut without FastScripts using Mac’s Services menu, but FastScripts is a great tool you should have anyway if you’re using AppleScript, so now’s a good time to go get it!).

To get started, let’s open Script Editor and start a new script. Our script is really short, and not very complicated, here it is:

Run the script now, and try a couple of searches. I’ve plugged in MacScripter and ASUsers List, you might like to play with a “choose from list” and add stackOverflow, OS X Technologies or any other sites you know of. Not sure how to do that? OK, try searching for “choose from list” with your new tool, and you’ll soon find out how!

Once you’re finished with the script, use FastScripts or Services to create a shortcut. Now, the next time you’re working in Script Editor and get stuck writing a script or keep stalling over some persistent error message, just hit your shortcut and type in an appropriate search term.