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"
repeat
try
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
else
log "Try again"
end if
end repeat
end tell