要检查的Apple脚本与其他应用程序共享iTunes Library XML

时间:2016-06-28 05:17:52

标签: macos applescript itunes

是否有任何苹果剧本

选中“与其他应用程序共享iTunes资料库XML”。从

的iTunes 喜好 高级标签... 我想阅读itunes媒体库.xml但是在lates itunes中默认情况下没有创建xml, 所以我希望我的应用程序通过苹果脚本创建这个xml。 iTunes12.4

1 个答案:

答案 0 :(得分:3)

试试这个(在El Capitan上创建)

activate application "iTunes"
tell application "System Events"
    tell process "iTunes"
        keystroke "," using command down
        repeat until exists toolbar 1 of window 1
            delay 0.2
        end repeat
        tell window 1
            if title does not contain "Advanced" then
                click button "Advanced" of toolbar 1
                repeat until its title starts with "Advanced"
                    delay 0.2
                end repeat
            end if
            tell checkbox "Share iTunes Library XML with other applications" of group 1
                if value is not 1 then
                    click it
                end if
            end tell
            click button "OK"
        end tell
    end tell
end tell