AppleScript指令在FaceTime中设置网络摄像头

AppleScript指令在FaceTime中设置网络摄像头,applescript,facetime,Applescript,Facetime,我需要使用AppleScript自动化FaceTime调用,但我的要求之一是选择一个特定的网络摄像头。我正在尝试使用以下代码: tell application "System Events" tell process "FaceTime" tell menu bar 1 tell menu bar item "Video" click menu item "Webcam 520X" end tell end tell e

我需要使用AppleScript自动化FaceTime调用,但我的要求之一是选择一个特定的网络摄像头。我正在尝试使用以下代码:

tell application "System Events"
tell process "FaceTime"
    tell menu bar 1
        tell menu bar item "Video"
             click menu item "Webcam 520X"
        end tell
    end tell
end tell
end tell
但我得到了这个错误信息:

系统事件发生错误:无法获取进程“FaceTime”的菜单栏1的菜单栏项“视频”的菜单项“Webcam 520X”


关于如何以正确的方式做这件事有什么建议吗?谢谢

菜单项
及其
菜单栏项

activate application "FaceTime"
tell application "System Events"
    tell process "FaceTime"
        tell menu bar 1
            tell menu bar item "Video"
                tell menu 1
                    click menu item "Webcam 520X"
                end tell
            end tell
        end tell
    end tell
end tell

activate application "FaceTime"
tell application "System Events"
    tell process "FaceTime"
        click menu item "Webcam 520X" of menu 1 of menu bar item "Video" of menu bar 1
    end tell
end tell