Lots of great answers here, but I haven’t been able to pull out anything about this… I have an app whose interface is full of popupbuttons that don’t have names. I think I need to refer to them just by their sequence numbers in their containers (groups, which are also unnamed). But I’m not sure why this code isn’t working. The compiler is mad about the 11 where expects end of line after popupbutton. So how do i tell the group which of the 12 popupbuttons I’m interested in? (For the record, each of these popupbuttons contains the same items.)
tell application "System Events"
tell process "Workgroup Videohub"
tell window "Blackmagic Workgroup Videohub"
tell group 1
tell popupbutton 11
click menuitem "none"
end tell
end tell
end tell
end tell
end tell
tell application "System Events"
tell process "Workgroup Videohub"
tell window "Blackmagic Workgroup Videohub"
tell group 1
tell pop up button 11
tell menu item "none"-- should this be "None"?
click
end tell
end tell
end tell
end tell
end tell
end tell
This also compiles.
tell application "System Events"
tell process "Workgroup Videohub"
tell window "Blackmagic Workgroup Videohub"
tell group 1
tell pop up button 11
click menu item "none"
end tell
end tell
end tell
end tell
end tell
Thanks this worked great, once I discovered that the upper left hand group was group 4 in this particular software. Too bad the UI Element Inspector doesn’t reveal the numbering. For the next noob that stumbles on this, here’s my final script
tell application "Workgroup Videohub"
activate
end tell
delay 1
tell application "System Events"
tell process "Workgroup Videohub"
tell window "Blackmagic Workgroup Videohub"
tell group 4 -- STRANGE BUT TRUE
-- FIRST WE CHANGE CAP1
tell pop up button 2
click
delay 1
tell menu 1
click menu item "Evertz 1 (line cut)"
end tell
end tell
-- LOCK IT IN
tell button 2
delay 1
click
end tell
-- THEN WE CHANGE CAP2
tell pop up button 3
click
delay 1
tell menu 1
click menu item "Evertz 2 (ISO)"
end tell
end tell
-- LOCK IT IN
tell button 3
delay 1
click
end tell
end tell
end tell
end tell
end tell
Model: Mac Mini
AppleScript: 1.10.7
Browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060613 Camino/1.0.2
Operating System: Mac OS X (10.4)