Adobe Acrobat Pro XI Mouse Click

Hi Guys,

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.

Thanking You
Mathews

I’m on the latest version of Acrobat from CC, which I think is very different, so I’m having trouble trying to look at this myself.

You want to drill down through the UI to find the syntax to address the button you need, and then clicking it is as simple as writing “click it.”

There are 4 main ways I know of to find the right syntax to get to that button -

  1. Use Accessibility Inspector, free but included with X-Code, which is a big download, and in my experience occasionally provides wonky info. There’s someone providing a stand-alone download here, but I can’t vouch for the quality of the source:
    https://forum.keyboardmaestro.com/t/os-x-accessibility-inspector-uielementinspector-tool-for-ui-scripting/3443
  2. Use UI Browser, which was made for exactly this, costs money, but has a free trial:
    https://pfiddlesoft.com/uibrowser/
  3. 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/
  4. 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.”