It does, would it be helpful to send an example tell block from UI browser alongside the return of your macro?
Yes, why not. Could you also show me the output of the very first action in the macro too.
Applescript From UI Browser:
click button "Record Enable" of group "Normal Transport Buttons" of group "Transport View Cluster" of window "Edit: TEST-001"
Tell Block from Macro
activate application "Pro Tools"
tell application "System Events"
tell process "Pro Tools"
click window "Edit: TEST-001"
end tell
end tell
Output from first action
UI element:window Edit: TEST-001 of application process Pro Tools, minimum value:missing value, orientation:missing value, position:2, 27, class:window, accessibility description:missing value, role description:standard window, focused:false, title:Edit: TEST-001, size:2555, 1004, help:missing value, entire contents:, enabled:missing value, maximum value:missing value, role:AXWindow, value:missing value, subrole:AXStandardWindow, selected:missing value, name:Edit: TEST-001, description:standard window, AXFocused:false, AXFullScreen:false, AXTitle:Edit: TEST-001, AXChildrenInNavigationOrder:System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, System Events, AXFrame:2, 27, 2557, 1031, AXPosition:2, 27, AXGrowArea:missing value, AXMinimizeButton:button 17 of window Edit: TEST-001 of application process Pro Tools, AXDocument:file:///Volumes/Work%20Audio%20EM//TEST-001/TEST-001.ptx, AXSections:SectionUniqueID:AXContent, SectionDescription:Content, SectionUniqueID:AXContentNavigator, SectionDescription:Content Navigator, AXCloseButton:button 15 of window Edit: TEST-001 of application process Pro Tools, AXMain:true, AXActivationPoint:72, 41, AXFullScreenButton:button 16 of window Edit: TEST-001 of application process Pro Tools, AXProxy:image TEST-001.ptx of window Edit: TEST-001 of application process Pro Tools, AXDefaultButton:missing value, AXMinimized:false, AXChildren:group Edit Mode Cluster of window Edit: TEST-001 of application process Pro Tools, group Zoom Quadrant Cluster of window Edit: TEST-001 of application process Pro Tools, group Cursor Tool Cluster of window Edit: TEST-001 of application process Pro Tools, group Counter Display Cluster of window Edit: TEST-001 of application process Pro Tools, group Grid/Nudge Cluster of window Edit: TEST-001 of application process Pro Tools, group Quantize Cluster of window Edit: TEST-001 of application process Pro Tools, group Transport View Cluster of window Edit: TEST-001 of application process Pro Tools, button ToolbarOptionsMenu of window Edit: TEST-001 of application process Pro Tools, table Track List of window Edit: TEST-001 of application process Pro Tools, static text TRACKS of window Edit: TEST-001 of application process Pro Tools, button Track List pop-up of window Edit: TEST-001 of application process Pro Tools, table Group List of window Edit: TEST-001 of application process Pro Tools, static text GROUPS of window Edit: TEST-001 of application process Pro Tools, button Group List pop-up of window Edit: TEST-001 of application process Pro Tools, button Groups Keyboard Focus of window Edit: TEST-001 of application process Pro Tools, radio button MIDI EDITOR 1 of 3 of window Edit: TEST-001 of application process Pro Tools, radio button MELODYNE 2 of 3 of window Edit: TEST-001 of application process Pro Tools, radio button CLIP EFFECTS 3 of 3 of window Edit: TEST-001 of application process Pro Tools, button Linearity Display Mode - Samples or Ticks of window Edit: TEST-001 of application process Pro Tools, button Edit Window View selector of window Edit: TEST-001 of application process Pro Tools, static text 3 of window Edit: TEST-001 of application process Pro Tools, button Add Marker/Memory Location of window Edit: TEST-001 of application process Pro Tools, static text Selected of window Edit: TEST-001 of application process Pro Tools, table Markers of window Edit: TEST-001 of application process Pro Tools, button Show/Hide SessionView of window Edit: TEST-001 of application process Pro Tools, button Edit Keyboard Focus of window Edit: TEST-001 of application process Pro Tools, button Audio Zoom In of window Edit: TEST-001 of application process Pro Tools, button MIDI Zoom In of window Edit: TEST-001 of application process Pro Tools, slider Slider of window Edit: TEST-001 of application process Pro Tools, button Track List Show/Hide of window Edit: TEST-001 of application process Pro Tools, button Show/Hide Docked MIDI Editor of window Edit: TEST-001 of application process Pro Tools, static text 5 of window Edit: TEST-001 of application process Pro Tools, button Show/Hide Clip List of window Edit: TEST-001 of application process Pro Tools, button 15 of window Edit: TEST-001 of application process Pro Tools, button 16 of window Edit: TEST-001 of application process Pro Tools, button 17 of window Edit: TEST-001 of application process Pro Tools, image TEST-001.ptx of window Edit: TEST-001 of application process Pro Tools, static text Edit: TEST-001 of window Edit: TEST-001 of application process Pro Tools, AXRole:AXWindow, AXParent:application process Pro Tools, AXTitleUIElement:static text Edit: TEST-001 of window Edit: TEST-001 of application process Pro Tools, AXCancelButton:missing value, AXModal:false, AXSubrole:AXStandardWindow, AXZoomButton:button 16 of window Edit: TEST-001 of application process Pro Tools, AXRoleDescription:standard window, AXSize:2555, 1004, AXToolbarButton:missing value, _AXActions:AXRaise
Can you use UI Browser's View Report button to show me the full element tree?
PATH:
application "Pro Tools"
standard window "Edit: test 00002" (window 1)
"Transport View Cluster" (group 7)
"Normal Transport Buttons" (group 1)
button "Record Enable" (button 8)
ACTIONS:
press
show menu
ATTRIBUTES (long values are truncated to 60 characters):
children
type: (null)
value: ---
modifiable: no
label
type: string
value: "Record Enable"
modifiable: no
enabled
type: Boolean
value: true
modifiable: no
keyboard focused
type: Boolean
value: false
modifiable: no
frame
type: rect
value: {{1152, 68}, {33, 33}} x, y, width, height
modifiable: no
help
type: string
value: "Record Enable"
modifiable: no
identifier
type: string
value: "1382376224"
modifiable: no
parent
type: UIElement
value: "Normal Transport Buttons"
modifiable: no
position
type: point
value: {1152, 68} x, y
modifiable: no
AXReplaceRangeWithText
type: (null)
value: (null)
modifiable: parameterized
role
type: string
value: AXButton
modifiable: no
type
type: string
value: "button"
modifiable: no
selected children
type: (null)
value: ---
modifiable: no
size
type: size
value: {33, 33} width, height
modifiable: no
subrole
type: string
value: toggle
modifiable: no
title
type: string
value: "Record Enable"
modifiable: no
title UIelement
type: (null)
value: ---
modifiable: no
top level UIelement
type: (null)
value: ---
modifiable: no
value
type: string
value: "Record Button"
modifiable: no
visible children
type: (null)
value: ---
modifiable: no
window
type: (null)
value: ---
modifiable: no
NOTIFICATIONS:
announcement requested
created
element busy state changed
focused UI element changed
help tag created
layout changed
moved
resized
row collapsed
row count changed
row expanded
selected cells changed
selected children changed
selected children moved
selected columns changed
selected rows changed
selected text changed
title changed
UI element destroyed
units changed
value changed
I've tried my best, but without actually having PT to test, I'm at a bit of a dead-end I'm afraid.
Perhaps someone else can help. In the meantime, I think this macro is good for most uses, but not heavily nested UI elements, which fortunately seem to be comparatively rare.
No worries, appreciate you looking at it!