After literally years of hounding, I’ve made my AppleScript-running screen saver utility a Universal Binary. ScriptSaver allows you to run an AppleScript when the screensaver is activated, and another when it is deactivated — common uses being to log out the current user after a specified idle time, emptying the trash and tidying the desktop, or simply changing your away status in Adium or iChat.
ScriptSaver also now supports screensavers in /Library/Screen Savers.
Download ScriptSaver here.

14 Comments
Hi Matt
This is a great utility, but I’ve found a bug when using macosxhints’ “Use iTunes visuals as a screen saver” at http://www.macosxhints.com/article.php?story=20040205044431199. It works fine when tested, but when it comes on after time out, you have to press a key or click a mouse button before the visualizer will come on!
Dan
Interesting — I’ve never used the iTunes visualizer thing. Not sure why that wouldn’t work, but the author of the article might be able to help.
how bout makin it recognize quartz screensavers?
Those don’t contain an NSScreenSaver subclass that I can instantiate, nor do slideshow .savers.
This is great. I’ve been looking for a way to trigger some scripts when the screensaver was initiated. It doesn’t work with the 3D Desktop Aquarium screen saver, though. Is that one quartz-based?
Either way, the functionality your saver provides is more useful to me than the eye candy, but I’m a curious guy, so I thought I’d ask.
Thanks.
Good question. I honestly don’t know what the story is on the Aquarium screen saver — if it shows up in the list, it should be something we support. It’s more likely that the authors are doing something ‘interesting’ with how they write to the screen…
is it possible to have the script run after the screensaver starts?
my applescript pauses any running media players, then calls the SleepDisplay app to turn off the backlight, instead of just dimming it.
since ScriptSaver starts the screensaver, even if “none” is selected, after my script, it turns the backlight back on.
Rich, what if you put a “delay 10″ call at the top of your AppleScript?
the delay sort of works. after adding it, i cannot pause VLC and that causes the screen to unblank.
this is what i’m using to pause vlc:
tell application “System Events” to if (application processes whose name is “VLC”) is not {} then
tell application “VLC” to activate
— map key ‘u’ to ‘pause only’ in vlc preferences
tell application “System Events” to keystroke “u”
end if
Rich, could you send me an email? I may have a solution for this.
This is exactly what I’ve been looking for. I wanted to use it to turn my desk light on when I’m using my computer and off when I’m not (using X-10). It works fine when I test it, and if I let the screen saver kick in, it turns the light off, but then a few minutes later the light turns back on, even though the screen stays blank. And it never turns the light back off.
Has anyone else experienced this?
I followed up with Todd offline on this — sounds like his Energy Saver -> “Dim the screen” settings are interfering with the screensaver.
Hi, I’m trying to do the following:
At 9:00pm local machine time:
- activate nocturne (i.e. switch to night)
- set brightness to minimum
- change the screen saver to an ALL WHITE (black – since nocturne is in night mode) screen
- set the screen saver delay to 1 minute
- set the sleepdisplay timout to 5 minutes
And then at 7:00am reverse things back to my ‘daytime’ preferences.
This is so that those 2am brainstorms don’t blind me when I jump up and ssh into the production environment (just kidding), and so that I can have itunes running my ’sleepytime’ playlist without keeping me away with inverted digital blasphemy photos…
Or is there a better way?
uhh. yeah. away = awake in my previous comment. sorry to bozo.
2 Trackbacks
[...] this: ScriptSaver 2.8 « Movin’ to Seattle With this AppleScript on start: tell application "iTunes" set visuals enabled to true [...]
[...] ScriptSaver [...]