获取iTunes曲目Applescript的位置
我有下面的代码在iTunes中转换曲目,但当它试图获取转换曲目的位置时,它会出错:获取iTunes曲目Applescript的位置,applescript,itunes,Applescript,Itunes,我有下面的代码在iTunes中转换曲目,但当它试图获取转换曲目的位置时,它会出错: tell application "iTunes" set theFiles to the selection repeat with theTrack in theFiles with timeout of 120 seconds set finish of theTrack to 30 s
tell application "iTunes"
set theFiles to the selection
repeat with theTrack in theFiles
with timeout of 120 seconds
set finish of theTrack to 30
set theSecondTrack to first item of {convert theTrack}
set theSecondPath to location of theSecondTrack
say "RingtoneDude has converted the song."
错误:
错误“无法获取库播放列表{file track id 3942的位置
应用程序\“iTunes\”}.编号为-1728的源id 65的id 2208来自
属于{«类别cFlT»id 3942属于«类别剪辑»id 2208属于«类别pLoc»
«类别CSC»id 65}
不幸的是,您误解了
位置的作用。在Finder中显示iTunes曲目实际上要复杂得多,但幸运的是Doug Adams已经完成了,如中所述
你肯定应该看看dougscripts.com的其他部分,因为他已经创建了一个名为“makeringable”的脚本(我想这是你的目标),并在GNU GPL下发布了它
==编辑:
很抱歉,看起来location
确实有效,但不是我所期望的,请在选择一个文件的情况下尝试以下操作:
tell application "iTunes"
tell item 1 of the selection to set theLocation to {get location}
tell application "Finder" to reveal theLocation
end tell
不幸的是,您误解了位置的作用。在Finder中显示iTunes曲目实际上要复杂得多,但幸运的是Doug Adams已经完成了,如中所述
你肯定应该看看dougscripts.com的其他部分,因为他已经创建了一个名为“makeringable”的脚本(我想这是你的目标),并在GNU GPL下发布了它
==编辑:
很抱歉,看起来location
确实有效,但不是我所期望的,请在选择一个文件的情况下尝试以下操作:
tell application "iTunes"
tell item 1 of the selection to set theLocation to {get location}
tell application "Finder" to reveal theLocation
end tell