Using Automator to Get At Things Applescript Won’t Cooperate With

One of the things that drew me to the Mac was Applescript – the idea of a scripting language that would work with most of the programs in the OS was… well, pretty freaking cool.

However, “most of the programs” eventually means “not the program I was using.” Then I came across this article – by using the Automator “Watch Me Do” recording function and a little bit of trickery, you can get the Applescript code to do whatever you need.

Random Useful Mac OS X User Tips: “I lamented this in one of my posts about Leopard, but I noted that there didn’t seem to be a way to directly access the AppleScript code from the Watch Me Do feature — Automator only creates run-only plugins or scripts. This is annoying if you want to modify the UI script later to do something slightly different. In this situation, you’d have to redo the whole set of actions all over again.”

Way cool.

More stuff on Mac

I had an a-ha moment today. I’ve been dabbling a little in Applescript – I had a need for a timestamp, so I wrote a small script that would create one and dump it into the clipboard. I set it to trigger off CMD-1 via Quicksilver, and now, if I do CMD-1, CMD-V I get a nice little time and date stamp pasted wherever the cursor is.

Then I started thinking. For work, every week I copy a bunch of files from where I work on them out to a shared folder on the network, then send an email to management saying “hey, they’re updated.” I then attach them to an email to send to one manager who doesn’t have access to the networked folder. I realized today that the entire process could be automated via Automator, linked to a Quicksilver trigger and *poof* the whole thing would be done.

This is the kind of stuff I was looking forward to doing on the Mac that I couldn’t do as easily on the Windows side.