I need to automate a FaceTime call using AppleScript, but one of my requirements is to pick a specific webcam. I am trying to use this code:
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
But I got this error message:
System Events got an error: Can’t get menu item "Webcam 520X" of menu bar item "Video" of menu bar 1 of process "FaceTime".
Any suggestion about how to do it in the right way? Thanks!
There is always a
menu
reference between themenu item
and itsmenu bar item
or