如何使用AppleScript在Itunes的子文件夹中选择播放列表?

时间:2013-03-14 12:00:57

标签: applescript itunes

此代码将返回iTunes中的所有播放列表:

tell application "iTunes"

get name of playlists

end tell

如何在子文件夹中返回所有播放列表?

提前谢谢。

1 个答案:

答案 0 :(得分:2)

您可以尝试这样的事情:

tell application "iTunes"
    set myList to {}
    set myFolder to folder playlist "testFolder"

    set myPlaylists to playlists
    repeat with aPlaylist in myPlaylists
        try
            if aPlaylist's parent = myFolder then set end of myList to aPlaylist's name
        end try
    end repeat

    return myList
end tell