ui inspector code to applescript

Hi all,

busy day.

is there a way to translate code i have from teh UI inspector to applescript?

here is the code that i have:

<AXApplication: “Acrobat”>
<AXWindow: “Batch Sequences”>
<AXButton: “Run Sequence”>

AXRole: “AXButton”
AXRoleDescription: “button”
AXParent: “<AXWindow: “Batch Sequences”>”
AXTitle: “Run Sequence”
AXWindow: “<AXWindow: “Batch Sequences”>”
AXTopLevelUIElement: “<AXWindow: “Batch Sequences”>”
AXPosition: “x=622 y=557”
AXSize: “w=128 h=17”
AXEnabled: “1”
AXFocused (W): “0”

AXPress - press

its to key a batch script in acrobat.


Hi dave

This should get you to the bit you want! However it doesn’t work very well
i don’t think the “run sequence” button likes GUI scripting you can definetly see
the button change color when its pressed but nothing happens, have a look see what you think:

tell application "System Events"
	tell process "Adobe Acrobat 7.0 Professional"
		set frontmost to true
		click menu item "Batch Processing..." of menu "Advanced" of menu bar 1
		delay 1
		tell window "Batch Sequences"
			click button "Run Sequence"
		end tell
	end tell
end tell

Maybe somebody else has a better way or you can even script your file batching another way Dave…!

I’ve seen quite a few people try to use SE and the GUI myself included and none that have had this work yet. I think it was Adobe’s intention to not be able to do this for some reason. When I spoke to then about no new features in Applescript they said they were not developing any it was all Javascript. IMO the best route would be have your Applescript do Javascript. Best of luck.

thanks everyone for the input and help!

yeah it seems adobe is trying more and more to be microsoft.

Maybe there’s something in the rumours about their proposed name change to Microbe. (Just another name for a bug, really…) :wink:

dear mark,

do you have any code snippets in javascriot to make this work?