0

我正在尝试使用 applescript 在 iTunes 中自动选择一个菜单项。但是,每次我运行这个脚本时,我都会收到一条错误消息,上面写着“预期的行尾,但找到了数字,并指向“scrollarea 1”。我正在使用 Apple 的 UIElement 检查器来获取 GUI 元素的名称iTunes. 任何帮助将不胜感激。

这是我到目前为止所拥有的:

tell application "iTunes"
      activate
      delay 10
      tell application "System Events"
            key code 53
            tell outline 1 of scrollarea 1 of window 1
                 click menu 1
            end tell
      end tell
end tell

好吧,我让它点击我需要它点击的东西。现在唯一的问题是它实际上并没有点击它,它只是返回 AXValue。我需要它来实际单击 iTunes 本身中的项目。

4

1 回答 1

0
activate application "iTunes"
tell application "System Events"
    tell process "iTunes"
        select row 15 of outline 1 of scroll area 2 of window "iTunes"
    end tell
end tell
于 2012-06-11T20:25:45.790 回答