- on forceQuitiTunes()
- tell application "System Events"
- try
- repeat 10 times
- if not (exists process "iTunes") then return
- with timeout of 60 seconds
- tell application "iTunes" to quit
- end timeout
- delay 1
- end repeat
- end try
- if not (exists process "iTunes") then return
- do shell script "iTunes=" & (unix id of process "iTunes") & "
- for i in {1..10}
- do
- sleep 1
- kill -0 $iTunes || exit 0
- kill -9 $iTunes
- done 2> /dev/null"
- end tell
- end forceQuitiTunes
- forceQuitiTunes()
- tell application "iTunes" to reveal URL track "181.FM - True R&B" of user playlist "Internet Songs"
Relaunch iTunes