GUI脚本用于通过" status"列出播放列表曲目的iTunes脚本

时间:2016-06-26 07:54:25

标签: applescript itunes

一直在使用GUI并使用元素检查器,但似乎无法让AppleScript单击iTunes播放列表左上角的小按钮,按照按顺序对曲目进行分类。播放列表(它是空白的,但是检查员说它是一个名为"状态"的AXButton)。

有什么想法吗?

如果有非GUI方式这样做,很高兴听到它!

由于

塔迪

1 个答案:

答案 0 :(得分:1)

适用于iTunes 12.4.1.6 (在El Capitan上测试):

tell application "System Events"
    tell process "iTunes"
        tell splitter group 1 of window "iTunes"
            if exists splitter group 1 then
                tell button "status" of group 1 of outline 1 of scroll area 1 of splitter group 1 to perform action "AXPress"
            else
                tell button "status" of group 1 of outline 1 of scroll area 1 to perform action "AXPress"
            end if
        end tell
    end tell
end tell
相关问题