Streaming 使用OSX上的AppleScript从iTunes库中删除歌曲(URL)

Streaming 使用OSX上的AppleScript从iTunes库中删除歌曲(URL),streaming,applescript,itunes,Streaming,Applescript,Itunes,我通过AppleScript控制iTunes,并将URL添加到主库中(通过打开位置)http://...“) 有没有办法使用AppleScript从库中删除该条目?URL非常独特,因此我不担心删除用户的其他条目。尝试: tell application "iTunes" set myUrls to get every URL track repeat with aUrl in myUrls if (aUrl's address as text) starts wi

我通过AppleScript控制iTunes,并将URL添加到主库中(通过
打开位置)http://...“

有没有办法使用AppleScript从库中删除该条目?URL非常独特,因此我不担心删除用户的其他条目。

尝试:

tell application "iTunes"
    set myUrls to get every URL track
    repeat with aUrl in myUrls
        if (aUrl's address as text) starts with "http://shiva.6o4.net:" then delete aUrl
    end repeat
end tell

太棒了,这就行了。你知道我是否可以添加这样一个脚本作为钩子吗?基本上,当播放结束(即连接关闭或正在播放下一首歌曲)时,Tom Cruise接收方向功能会希望删除一个曲目。:)