

The correct “path” is this one: text field 1 of UI element 1 of (rows whose value of attribute "AXSelected" is true) of table 1 of scroll area 1 of group 1 of splitter group 1 of window "Reminders"īut, as I first checked the reminder with Accessibility Inspector I couldn’t find all of the needed names of the elements. One problem with the Accessibility Inspector is that often it doesn’t provide you with the exact terms (UI element names) you need for a working UI script.įor example recently I had the problem to get the name of a selected reminder in the Reminders app. (You can also launch it through Spotlight without Xcode, it’s in /Applications/Xcode.app/Contents/Applications/) Menu bar: Xcode > Open Developer Tool > Accessibility Inspector. The Accessibility Inspector is also contained in Xcode, in case you have it already installed. At $55, it is not cheap, but could save you many hours of development time. If you need to do a lot of UI scripting, or work with a very complicated app, then you may want to consider a professional tool, like UI Browser. It is the same link as provided by the "Download Sample Code" link on the Apple Web PageĪ Strategy for UI Scripting in AppleScript using UIElementInspector.Just copy this app file to your Applications folder.UIElementInspector.app, which is all you really need.This zip file has the source code for the Inspector, but fortunately also includes the built app:.DOWNLOAD: UIElementInspector.zip (198 KB).How to use: A Strategy for UI Scripting in AppleScript using UIElementInspector.Apple Web Page: UIElementInspector - Mac Developer Library.Alternate Name: Accessibility Inspector.Here is a free tool, provided by Apple, that will help you identify the UI elements you need to script: You may then need to resort to UI scripting. Sometimes an app, or even the OS X system itself, does NOT provide a direct scripting element that allows you to achieve your objective. For more complex UI scripting, you will benefit from UIBrowser, which works will all macOS including Mojave.Use the AppleScript tool by Chris Window Analysis Tool for System Events.UIElementInspector provided as part of the free Xcode download (as suggests).Instead, I suggest you try one of these tools:

So, I no longer recommend this tool, as it does not work with all macOS's. Since I posted this topic nearly 3 years ago, I've learned a lot. OS X Accessibility Inspector (UIElementInspector) Tool for UI Scripting
