Wednesday, January 02, 2008

AppleScript - summarize email is useful

I have a library of AppleScript books, but I've never done much with it -- in part because I always thought it was one step away from extinction. It's also a really lousy programming language (scoping anyone?).

Well, whatever its past status it's still with us, and Apple has even fixed up their once decrepit AppleScript: AppleScript Examples page. Automator and AppleScript have been revised in 10.5, the documentation finally left the 20th century, and Python hasn't taken over completely ... yet (alas).

Even in 10.4 I'm rediscovering useful things. Take, for example, the little known "Summarize Message" script buried away in the Mail Scripts folder. Here's what it does:
... This script demonstrates how to write a script that can be executed
directly from the Scripts menu in Mail. It acts on the selected messages,
which are passed in to the 'perform mail action with messages' handler.

This script will take the selected message, create a summary using the
summarize command built into the Standard Additions, then speak the
summary using the say command, also built into Standard Additions...
My mother's vision is failing. This is something she could use, though I've already programme done key to active the built-in generic reading engine. Too bad Mail.app doesn't let me attach a script to a nice fat icon, but I might create a rule that would routinely read each message she opens. (Rules are hidden away in mail preferences -- which is not a logical place for that function.)

By the way, my favorite 10.4 voice is "Vicki". I hear 10.5 has even better voices.

Update: After a bit of experimenting I created an Application from Summarize Email. I then gave it a nice icon from the Icon Factory and put it in the Dock. So it's easy to click on whenever my mother is reviewing her email.

No comments:

Post a Comment