0

I'm trying to make an automation that adds people to a FaceTime call. I tried using Accessibility Inspector to find where the + button is in the UI. Link to Screenshot

I'm don't know much AppleScript, so I just copied all the UI element types and names/indexes from Accessibility Inspector into Script Editor, but it gave me the error "Expected end of line but found number." When I remove the section 1 and collection 1 parts it builds, but when I run it it says that it "can't get group 1 of scroll area 1 of window 1." I've tried replacing "section" and "collection" with "UI Element," but that still didn't work. Do "collections" and "sections" have a different name when using AppleScript, or am I doing something else wrong?

Here's my current code:

tell application "System Events"
    tell process "FaceTime"
        click button 1 of group 1 of section 1 of collection 1 of scroll area 1 of window 1
    end tell
end tell
9
  • 1
    System Events doesn't have section or collection UI elements, so those may be ignored elements or just names/titles. See the Processes Suite in its scripting dictionary for UI element classes. Commented Jan 5 at 1:14
  • Where would I find that? Commented Jan 5 at 3:04
  • 1
    That would be in the System Events scripting dictionary, which can be opened in the Script Editor. Commented Jan 5 at 4:02
  • I use this trick to get the UI element Commented Jan 5 at 7:04
  • Automator's Watch Me Do action is also surprisingly useful, as the action events can be pasted to the Script Editor. Commented Jan 5 at 16:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.