It has to be said - Tiger Roxxors your Boxxors. I’m loving Mac OS 10.4, it’s above and beyond what I expected, even from Apple.
Anyhow rather than repeat press-releases I’d like to share one of the coolest ‘hidden’ features of Tiger which I’ve combined with some clever scripting and hacks to create the ultimate wake-up alarm.
There is, in Tiger an amazingly cool screensaver. It reads an RSS feed of your choice and then displays the articles in a fantastically beautiful 3d data matrix that spins elegantly against an azure backdrop. I can’t really explain it properly except to say that having the news presented to you in such a way is a wonderful experience.
Here’s the Screensaver in action.
Anyhow I’ve long been a fan of writing elaborate Applescripts to wake me up in the morning or perform tasks whilst I sleep and I decided that what I really wanted was to combine my usual “Morning’s Here” wakeup with a sweeping visualization of the days news to read when I became more awake (and had of course, found my glasses).
The first bit of code was easy, iTunes like every Apple application is easily Applescripted so getting it to play my wakeup playlist only takes this much code:
tell application “iTunes”
activate
play playlist “Morning's Here!”
end tell
Now I had to get the screensaver to trigger. Also easy:
tell application “ScreenSaverEngine”
activate
end tell
But then hit a problem. When I sleep I like to have my computer running tasks such as downloading TV shows or optimizing its file structure for maintenance and I simply set the display to sleep. The problem is that all the shiny 3D RSS data is wasted on a black screen and I don’t necessarily want to move my mouse to wake the display from sleep, especially if such activity would also cancel the screensaver.
I knew there was an energysaver.plist file but I really didn’t want this Applescript to screw around running Shell Scripts to manually edit Preferences files, it just didn’t seem elegant or simple enough and to be honest was a little too tech-hacky for my liking (I’d rather have an ingenious hack that a newcomer to Applescript could use than one which required some knowledge of Unix commands that not everyone can be bothered to learn).
Then I remembered reading a MacOSxHint about how Exposé cancels display sleep, it was discovered when people were screwing around with Applescript to make the then new, Exposé function do things like turn all your windows tiny even after you ended the effect.
So I did a little ferreting around and discovered there was a call you could make to System Events which triggered the Exposé effect:
tell application “System Events” to key code 101.
So now the script does the following:
It triggers Exposé, ending the display sleep on my computer.
It tells iTunes to start playing my wakeup playlist.
It activates my screensaver which dutifully starts reeling off all the day’s news in glorious OpenGL 3D.
If you’d like to try it out, the script is available here.
Other stuff in Tiger is so cool I can hardly begin to explain it, like the new Ultra-Ultra-High Definition Low File Size H.264 video codec.
I’ll leave you to check it out if you’re interested
Later
John
Posted by John Swaine at May 4, 2005 12:04 PM