I am using Mac OS X “Yosemite” - Version 10.10.5, Adobe Acrobat Pro XI - Version XI, Script Editor - Version 2.7.
I would like to make a mouse click in the Option Button of Tag Panel in Acrobat XI.
After a long Googling I get the below script which describes UI Elements, Groups, Button, Radio Button etc., of the Application Window.
Googled Script
tell application "Adobe Acrobat Pro"
activate
set allButtons to {}
tell application "System Events"
tell process "Acrobat"
with timeout of 0 seconds
set tElements to entire contents of window 1
end timeout
repeat with i in tElements
if class of i is button then set end of allButtons to contents of i
end repeat
end tell
end tell
end tell
The Below line are which I need.
get class of menu button "Options" of group 2 of group 2 of group 1 of group 1 of window "ABC" of application process "AdobeAcrobat"
--> menu button
How to make Mouse Click on this Option Button?
After Clicking the Option Button, I would like click in the pop up window.
Use Script Debugger, which allows you to browse UI hierarchies, but for some programs, it can’t extract data unless the program is in front. It’s also paid, but has a free trial: https://latenightsw.com/
Use Script Editor to drill down.
ie:
tell application "System Events"
tell application process "AdobeAcrobat"
set UI1 to every UI element
end tell
end tell
return UI1
result:
next step, look inside an element:
tell application "System Events"
tell application process "AdobeAcrobat"
set UI2 to every UI element of window "Acrobat Pro DC"
end tell
end tell
return UI2
result:
And keep modifying your script drilling down through the elements until you find that “options” button.
Then just do a nested “tell” all the way to that element, ending in a “click it.”