【问题标题】:GUI scripting iTunes to list playlist tracks by "status"GUI 脚本 iTunes 按“状态”列出播放列表曲目
【发布时间】:2016-06-26 07:54:24
【问题描述】:

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

有什么想法吗?

如果有非 GUI 的方式来做这件事,很高兴听到它!

谢谢

迟到

【问题讨论】:

    标签: applescript itunes


    【解决方案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
    

    【讨论】:

      猜你喜欢
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-23
      相关资源
      最近更新 更多