This macro gets a bunch of information about the front window in the front application (specific to System Events UI-Scripting).
At present this is raw information that won't be very readable by the uninitiated, although I'll probably change that in time by finding and replacing the chevron-codes with their English equivalents.
Fixed in version 1.5 below.
The purpose of the macro is to discover whether System Events can see UI-Elements in the front window. This is very useful, because System Events can see and do things Keyboard Maestro can't.
I still remember laughing when I saw a Z28 with a license plate that was (I think this is right) "5AF2F8", which again IIRC is EBCDIC for "Z28". The EBCDIC numbers were the giveaway, since they start with "F". Back in the day when EBCDIC was still a thing.
Uh, that's not the only difference. The other macro produces results that make sense to me. This, as @JMichaelTX said, takes me back to reading HEX dumps. No, that's not right - reading assembly language. I'll bet there's some NOP and HCF codes in there somewhere!
Updated to version 1.01.
Now requires Yosemite or greater.
It's faster and many of the chevron-codes are now replaced with human-readable names. (There are a lot of codes, so I certain to have missed some.)
I've added a property at the top of the script that allows switching the output between TextEdit and the default text editor set in the Finder's Get-Info dialog. (If you haven't changed it on your system then the default is TextEdit.)
In my opinion BBEdit (or its freeware sibling TextWrangler) is a better vehicle for viewing this output than TextEdit. One reason for this is the ability to turn on “Show Tab Stops”, which makes the view of the hierarchy clearer (some other programming editors also have this feature).
You know, it's funny you posted this. I was wondering today if there's any sort of native way to display hierarchical data on the Mac. For example, here's the plist view from Xcode:
Another possibility would be to output XML. Most browsers support reading XML and collapsing nodes, etc. I could probably shake the dust off my XML skills if you needed help.
I'm not going to fiddle with transforming it to XML at the moment, but I have an osax that might make that easy – so I'll think about it.
I'm not aware of any freeware hierarchical viewers for the Mac other than Xcode. I have a great utility called PlistEdit Pro that's much lighter weight than Xcode (but also more expensive).