ScriptSaver full review
I briefly mentioned ScriptSaver in my video on screen savers, but it deserves some dedicated coverage. Unlike most screensavers, which show you something, ScriptSaver does something. Specifically, it can run any AppleScript when the screen saver activates, and another AppleScript when the screen saver deactivates.
For example, you could create a script that logs out the current user, and then set that script to run whenever the screen saver activates, making ScriptSaver a simple way to automatically log out after a period of inactivity - great for lab environments or to add another layer of security to your Mac.
The developer provides a number of example scripts (download link), including ones for logging out, playing iTunes, and pausing iTunes. You can use the latter two to automatically pause iTunes playback when the screen saver kicks in and then resume playback when you start using your computer again.