Blogger Jeff = new Blogger

Programming and stuff in Western PA

Applescript to repeatedly try to connect to internet stream in ITunes

I listen to the same radio station each and every morning. Problem is, so do a lot of other people. The server I need to connect to allows for a maximum of 100 connections, so what I end up doing is repeatedly trying to connect until I can get one of those connections. Until now….

I created this little applescript to hammer away at that server. I saved it as a playlist, and just run the following :

local e
set e to 0

tell application "iTunes"
			play playlist ("My Radio Station Playlist name")
			delay (2)
		on error errStr number errorNumber
			set e to errorNumber
		end try
		if e is not equal to -5421 then
			exit repeat
			log "Try again"
		end if
	end repeat
end tell

January 7, 2009 - Posted by | Technology | ,

1 Comment »

  1. Found your website through google!

    Why this one-minute therapy is being suppressed in the U.S. while more than 15,000 European doctors have been using it to heal millions of patients

    Comment by Joyce | March 3, 2009 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: