Applescript Apple脚本-如何单击按钮菜单内的菜单项?

Applescript Apple脚本-如何单击按钮菜单内的菜单项?,applescript,Applescript,请找到上面元素路径的屏幕截图。Apple脚本事件在单击窗口“电影录制”按钮3的菜单1的菜单项“X”时引发错误。您必须单击按钮,稍等片刻,然后选择菜单项 activate application "QuickTime Player" tell application "System Events" tell process "QuickTime Player" tell window "Movie Recording" click button 3


请找到上面元素路径的屏幕截图。Apple脚本事件在单击窗口“电影录制”按钮3的菜单1的菜单项“X”时引发错误。

您必须
单击按钮,稍等片刻,然后
选择菜单项

activate application "QuickTime Player"
tell application "System Events"
    tell process "QuickTime Player"
        tell window "Movie Recording"
            click button 3
            delay 0.2
            pick menu item "Maximum" of menu 1 of button 3
        end tell
    end tell
end tell