AppleScript—Apple’s comprehensible to non-programmers scripting language for creating what we used to call macros back in the early days of the Mac, and for automating tasks—has been supported by all versions of the Macintosh operating system since System System 7.1.1 in October 1993. A legacy of the fondly remembered HyperCard program’s English language-based scripting language, HyperTalk, AppleScript brought scripting capability to other applications on the Mac.
An extremely slick and user-friendly implementation of AppleScript has been a marquee feature of Tom Bender’s superb little shareware styled text editor Tex Edit Plus since the ’90s. TE+ has been my main software work tool for nearly 15 years, and a big part of the reason is AppleScript. For example, using AppleScripts I’ve been able to custom tailor Tex Edit Plus to serve as an HTML markup application that precisely suits my needs without any excess bloat.
You can author or record your own AppleScripts, choose from dozens of built-in Automator actions, or download dozens of off-the-shelf AppleScripts for an array of functions and shortcuts from the Tex-Edit Plus Archives.
Unfortunately, AppleScript is not supported by the iOS, which appears to be the future of Apple operating systems, and there is indication that Apple is letting AppleScript support slip in OS 10.7 Lion.
Tom Bender, who has released a Lion-compatible upgrade of Tex Edit Plus tells me he’s been using Lion for several months now, but is still not sure what to think about Apple’s ongoing commitment to AppleScript.
“On the one hand,” says Tom, “I am a bit apprehensive because we’ve reached 10.7.3 and Apple still has not fixed a significant AppleScript bug. Specifically, Lion does not emit ‘start-recording’ and ‘stop-recording’ events. This bug has been acknowledged by Apple tech, but there is no timeline for a fix. ‘Recordable’ applications (e.g. TEP) use these start/stop-recording events to know when to send action events to ‘recorder’ applications (e.g. AppleScript Editor). It’s one of the bugs I had to work around to make TEP compatible with Lion. Annoying.”
Happily, AppleScript still works fine in OS X 10.6 Snow Leopard, which I’ve been sticking with up to now.
On the other hand, Tom says AppleScript execution speed in Lion seems much faster than with previous versions of the OS, noting that “To demonstrate, I stripped the ‘AppleScript Demo.app’ of all programmed delays and pulled out a stopwatch. Lion takes 7 seconds to execute approximately 1,300 events, while Snow Leopard takes 53 seconds to accomplish the same task on the same computer. That’s almost an 8-fold speed up!”
So, it’s not all bad news. Tom says he hopes the the Mac user community will encourage Apple to maintain a long-term commitment to the AppleScript technology, especially recordability, observing that Automator, despite its attractive interface, “is a pale, slow substitute.”
I agree, and would find it impossible to maintain the workflow ecosystem I’ve developed over two decades on the Mac without AppleScript and Tex Edit Plus.
Good basic tutorial on using AppleScript: