Running AppleScripts on a Regular Basis Automatically
Automating tasks with AppleScript has always been a powerful feature of the Macintosh operating system; but, until recently, automating tasks repetitively required new software. With OS X, repetitious automation is built in.
AppleScript (http://www.apple.com/applescript/) is a
wonderful piece of technology that has long been part of the
Macintosh OS. Just about any application can become
AppleScript-powered, allowing automated tasks to be written in a
simple, English-like language. Because of this power and the ease
with which it can be had, kazillions of ApplesScripts have been
written, ranging from automating backups of emails, archiving data
from network-enabled services, and Finder-based scripts that promote
organization (make all these files lowercase), to plug-ins (type
itunes to place the currently playing song on the
clipboard).
What has been missing, however, is automation of the automation, repetitively running an AppleScript without user intervention. Take the following simple script, for example:
say the (current date) as string
Exemplar of AppleScript bluntness, this uses text to speech to enunciate the current day and time. Type it into Script Editor (in Applications → AppleScript), click Run, and listen closely.
That’s all well and good, but what if you wanted the time spoken each and every hour, on the hour? Under Mac OS 9 and earlier, you would have had to make use of a third-party scheduling application — ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access