- on forceQuitiTunes()
- tell application "System Events"
- set pid to missing value
- repeat 10 times
- try
- set pid to unix id of process "iTunes"
- tell application "iTunes" to quit
- on error
- return
- end try
- delay 1
- end repeat
- do shell script "iTunes=" & pid & "
- for i in {1.10}
- do
- kill -0 $iTunes || exit 0
- kill -9 $iTunes
- sleep 1
- done > /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