Member leenoble_uk at macosxhints cooked up a way to shut down Mail at
night unless he was working late, to avoid noisy late-night ‘new mail’ notifications that were disturbing sleep in the
next room. The AppleScript solution
involves a trick to determine the system idle time and shut down or leave the app running depending on whether or not
the machine was in current use.
Clever idea, and the system idle time routine can surely be used to cook up other handy scripts to make your Mac
computing experience that much better. I think AppleScript must surely be the unsung hero of the Mac OS, and I’m
thinking it is high time I learned to speak it fluently, myself.













Reader Comments (Page 1 of 1)
6-16-2005 @ 4:14PM
Small Paul said...
I'd agree that it's unsung, but I think the stumbling block is the time it takes to learn, versus the time it saves you/useful things it does.
I spent some time either side of christmas reading some of the (in my opinion, delightful) book 'AppleScript: The Definitive Guide' from O'Reilly. I found two main difficulties.
First, AppleScript syntax is a fair bit different from other languages that I'm familiar with (i.e. PHP and JavaScript) - different enough to require a bit of thought.
Second, just figuring out how to control one application with it (and what exactly that application lets you control) is a bit of a black art in itself, as the book expalins well.
The reasonably limited benefits make all this extra effort less worthwhile. I'm still definitely keen on learning the language and writing some scripts, but it will be difficult to make it the priority it needs to be for progress to be made.
Reply