Use AppleScript to run tasks if computer has been idle
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.
Share
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...
Add a Comment
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.
January 28 2005 at 6:25 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Altec Lansing Octiv Duo iDock for $48 + free shipping
- Used Apple iMac 17" Core 2 Duo 1.83GHz for $430 + $28 s&h
- Lounge Deluxe Stand for iPhone / iPod touch for $28 + $8 s&h
- Brookstone Surround-Sound Earbuds for $14 + $7 s&h
- Refurbished Skullcandy Tokidoki Smokin' Buds Mic'd Headset for $5 + $2 s&h
- Stitchway Backup Battery for iPod / iPhone for $5 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



1 Comment