ScriptSaver: screensaver-triggered AppleScript
ScriptSaver is a Mac OS X screensaver that runs AppleScripts when it activates and deactivates. It can be used to perform periodic maintenance tasks when the computer is idle, run cleanup scripts on kiosk machines, or simply pause iTunes when you step away from the computer.
To install ScriptSaver, double-click on it or copy ScriptSaver.saver to the Screen Savers folder in the Library folder of your home directory. Source code is included.