Is it possible to get Script Debugger to return a reference in an A of B style rather than nested its references? Maybe a secret handshake key-down while getting?
tell application "System Events"
return UI element 1 of UI element 1 of row 8 of outline 1 of scroll area 1 of group 1 of scroll area 1 of group 2 of splitter group 1 of group 1 of sheet 1 of window "Keyboard – 52%" of application process "System Settings"
end tell
.
rather than
tell application "System Events"
tell its application process "System Settings"
tell its window "Keyboard – 52%"
tell its sheet 1
tell its group 1
tell its splitter group 1
tell its group 2
tell its scroll area 1
tell its group 1
tell its scroll area 1
tell its outline 1
tell its row 8
tell its UI element 1
UI element 1
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
Which can result in a “Tell statements are too deeply nested” error.
If not does anyone have a solid converter for these references already coded up?