Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use iTunes visuals as a screen saver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use iTunes visuals as a screen saver
Authored by: jonbauman on Feb 11, '04 01:41:03PM

If iTunes isn't playing anything, the above script will just go to a black screen. In order to use a regular screen saver in that event, you can use the following modified script.

property theModule : "Random"

tell application "iTunes"
	if player state is playing then
		set full screen to true
		set visuals enabled to true
	else
		do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -module \"" & theModule & "\""
	end if
	
end tell

I've set the module to Random, but you can easily replace that with the name of any installed module you like (e.g. "Flurry").

---

jon

[ Reply to This | # ]

Use iTunes visuals as a screen saver
Authored by: raggamuffin on Feb 12, '04 07:22:29PM

Excellent little hack, makes screensavers more interesting. However, there's one function missing - if it's showing the iTunes visualiser, it won't turn off with a simple movement of the mouse, it needs a click or a keypress (usually I press space, but that just pauses iTunes, which is a bit annoying). I'm a bit new to this AppleScript malarkey, but is there some workaround that could deactivate the visualiser when the mouse is moved?



[ Reply to This | # ]
Use iTunes visuals as a screen saver
Authored by: josh doubles on Feb 12, '04 08:42:48PM
I love the improvement but I noticed, with all these scripts, that if iTunes is not running it will be launched when the screen saver turns on.

I am a complete AppleScript novice but I devised this solution:


property theModule : "Cubes"
property okflag : false

tell application "System Events"
	if (get name of every process) contains "iTunes" then set okflag to true
end tell

if okflag then
	tell application "iTunes"
		if player state is playing then
			set full screen to true
			set visuals enabled to true
		else
			set okflag to false
		end if
	end tell
end if

if okflag is false then do shell script "/System/Library/Frameworks/
ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/
MacOS/ScreenSaverEngine -module \"" & theModule & "\""

Now you dont have to wonder why iTunes is always running. Enjoy!

[ Reply to This | # ]
Use iTunes visuals as a screen saver
Authored by: nerdtech on Feb 13, '04 11:49:05AM
This worked great - except you need to edit one line in your script:
if okflag then
actually needs to be...
if okflag is true then
Otherwise, it was still launching iTunes, if it was not currently opened. With that edit, I have a new screen-saver! Thanks!

[ Reply to This | # ]
Use iTunes visuals as a screen saver
Authored by: Sesquipedalian on Apr 06, '09 08:38:27PM

For people finding this hint through search engines:

All that is needed is to add a check to see if iTunes is running, and an activate line at the appropriate spot. There is no need for the shell script.



[ Reply to This | # ]