How to gather information about the UI elements for apple scripting?

Ever been into apple scripting? You must be wondering how I can find the names of all these UI elements that you can use in order to create that robust UI automation script. Well, Apple seems to have got your back. 

You'll need to download Xcode on the app store in order to use the Accessibility Inspector. Apple provides the Accessibility Inspector testing tool that can be launched by choosing Xcode > Open Developer Tool > Accessibility Inspector in the menu bar or Dock. You can download Xcode from the Mac App Store for free. The Accessibility Inspector presents a utility window that displays the information properties (and values), action methods, and position in the accessibility hierarchy of the object currently under the mouse pointer.

To use the Accessibility Inspector, first make sure that it has permission to control your computer. In Security & Privacy preferences, open the Privacy pane. In the left column, select the Accessibility option.

Once this is done, you can click on the cross hair icon and navigate across the UI to find details of each element.

That’s it for this blog post! I hope you learned something new! ☺️

Previous
Previous

How do I auto-generate an Apple Script?

Next
Next

How to find out who wrote a piece of code?