Correctly Identifying GUI Elements

Hey Tony,

In general you can use my Front Window Analysis Tool for System Events macro to suss out the UI structure of windows.

It's not as sophisticated as UI Browser or Script Debugger, but it's free.

In this case it doesn't work unaltered, because it can't tell the About window belongs to the "System Information" process.

I had to figure that out and then manually change the process name in the macro to produce this
examination of the window.

application Process "System Information"
   window About This Mac
      image 1
      button "System Report…"
      static text "8 GB 1067 MHz DDR3"
      static text "••••••••••••"
      button "Software Update…"
      static text "Mercury"
   static text "NVIDIA GeForce GT 330M 512 MB
      Intel HD Graphics 288 MB"
      static text "Version"
      static text "2.66 GHz Intel Core i7"
      static text "MacBook Pro (17-inch, Mid 2010)"
      static text "Processor"
      static text "Memory"
      static text "Startup Disk"
      static text "Graphics"
      static text "Serial Number"
      static text "macOS Sierra"
      static text "10.12.6"
      static text "™ and © 1983-2018 Apple Inc. All Rights Reserved."
      button "License Agreement"
      button 4
      button 5
      button 6
      toolbar 1
         group 1
            radio group 1
               radio button "Overview"
               radio button "Displays"
               radio button "Storage"
               radio button "Memory"
               radio button "Support"
               radio button "Service"

Given that information it was easy enough for me to write a UI-Scripting AppleScript to press a named radio-button in the About window and incorporate that into a macro:

Open About This Mac and Select a Given Panel.kmmacros (5.9 KB)

You can change the panel that's displayed by changing the button named in this line of the AppleScript:

tell radio button "Displays"

-Chris

1 Like