0
無法從基於它的播放列表選擇一個尋跡軌道的文件系統路徑(位置)。見下文。AppleScript的:在播放列表由它的文件系統路徑
我把箭頭放在每個命令的結果之前。
在第一行,我成功地找到播放列表「測試」的第一首曲目體裁「R & B」。
爲什麼第四行不工作?它看起來像我正在做的只是文件系統位置而不是流派搜索第1行。
是否有另一種方法可以做到這一點?
tell application "iTunes"....
set t to first track of playlist "Testing" whose genre is "R&B"
--> file track id 18476 of user playlist id 18414 of source id 72 of application "iTunes"
set l to location of track 1 of playlist "Testing"
--> alias "Lion:Users:cworth:Desktop:a.mp3"
set f to POSIX file "/Users/cworth/Desktop/a.mp3" as alias
--> alias "Lion:Users:cworth:Desktop:a.mp3"
set tt to first track of playlist "Testing" whose location is f
--> error "iTunes got an error: A descriptor type mismatch occurred." number -10001 to item
...end tell