dougscripts.com

August 11 2009 - 10:44 am

Re-Posting Stream Startup Script

A couple few days ago I posted a script here that would ping the Radio Paradise stream until its server accepted the connection, suppressing the error dialog that would appear when a connection was denied. Well, that was the wrong version of the script. Here is the correct version, and the one I fire up every morning. You must select a radio stream track first, then run the script:

tell application "iTunes"
	if selection is {} then return
	set strm to (item 1 of selection)
	if (get class of strm) is not URL track then return
	repeat
		try
			play strm
			exit repeat
		on error m number n
			delay 15
		end try
	end repeat
end tell


The earlier script used the open location command, errors from which could not be defeated with the try block.

Site contents © 2001 - 2019 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not interrupt the one doing it.