Hey folks, having a bit of a head-scratcher here. I’m trying to script some stuff in Avid Pro Tools, and I need to get at a menu triggered by a pop up button.
UI Browser is confusing me a bit (the hierarchy to elements in the menu when using the screen reader is:
ELEMENT PATH (starting at leaf element): ((/not sure what this means/)) menu item "User Time Stamp" (menu item 6) menu (menu 1) menu item "Sort by" (menu item 7) menu (menu -9223372036854775808 [MISMATCH-different children] application "Pro Tools"
Ideally, I’d need to be able to search one of these types of menus, as the items in them change a lot (I’ll be defining one of the menu items I’m looking for elsewhere in the script, through another part of Pro Tools).
Annoyingly the menus disappear if I try and do much of anything in UI Browser after opening them, so I’m not sure where to start. From what I can tell, they don’t seem to actually be contained within the Pro Tools process’ hierarchy.
The rest of my script currently looks like this (which is contained in a MASSIVE macro at the moment):
tell application "System Events" set EditWindow to a reference to (every window of process "Pro Tools" whose name contains "Edit") set Aux1 to a reference to (every group of EditWindow whose name contains "Aux 1") set Aux1Name to a reference to pop up button 1 of Aux1 click pop up button 1 of Aux1 end tell
It’s a bit more verbose than one would expect because I’m hoping to use this as a sort of framework for some other functions.