Applescript Adobe Acrobat Pro Save Image To PDF - applescript

I am trying to compile an applescript to get Adobe Acrobat Pro to save a selected image within a PDF to a JPEG.
This is what I have so far but I am not getting it to work.
Many thanks
Darryl
tell application "Adobe Acrobat Pro"
activate -- bring up acrobat
tell application "System Events"
tell process "Acrobat"
click menu item "Save As" of menu 1 of menu bar item "File" of menu bar 1
click menu item "Image" of menu 1 of menu bar item "Save As"
click menu item "JPEG" of menu 1 of menu bar item "Image" of menu bar 1
end tell
end tell
end tell

Give this a try
activate application "Adobe Acrobat Pro"
tell application "System Events"
tell process "Acrobat"
click menu item "JPEG" of menu 1 of menu item "Image" of menu 1 of menu item "Save As" of menu 1 of menu bar item "File" of menu bar 1
click button "Save" of window "Save As"
end tell
end tell
Tested on OS X 10.9.4 | Adobe Acrobat Pro 10.1.10

One issue... My excitement was a little premature...
This saves the whole page. If selecting an image in Acrobat and right clicking on it and selecting save image. Please see if you have a work around this.

Related

Pivot monitor with apple script. Error : 'Can't get button'

tell application "System Preferences"activateend tell
tell application "System Events"
set _0 to "Standard"
set _90 to "90°"
set _180 to "180°"
set _270 to "270°"
set preference to application process "System Preferences"
click UI element "Displays" of scroll area 1 of window "System Preferences" of preference
delay 1
click button "Display Settings..." of window "Displays" of preference
set monitor to window "LG 4K HDR" of preference
click monitor
set options to pop up button 1 of tab group 1 of monitor
set portrait to value of options is _270
click options
if portrait then
--switch to landscape mode
click menu item _0 of menu 1 of options
else
--switch to portrait mode
click menu item _270 of menu 1 of options
delay 5
click UI element "Confirm" of sheet 1 of monitor
end if
end tell
tell application "System Preferences"quitend tell
Result: error "System Events got an error: Can’t get button "Display Settings..." of window "Displays" of application process "System Preferences"." number -1728 from the button "Display Settings..." of window "Displays" of application process "System Preferences"
The above code is an automator script that pivots my monitor works until Mojave. After I update my mac, it doesn't work.
I actually don't know much about Apple Script. I got an error from 'click button "Display Settings..." of window "Displays" of preference'. I was trying to change 'button' as 'UI element', index, and system language. It doesn't work.
I think the error is because the button name is an ellipsis character and not triple dots ...
Can you try replacing that line with this instead (Monterey):
click (first button of window "Displays" of preference whose title starts with "Display Settings")

Apple Script - How to click menu items inside menu of a button?

Please find the screenshot above for the element path. Apple script event throws an error while clicking click menu item "X" of menu 1 of button 3 of window "Movie Recording"
You have to click the button, wait a bit and then pick the menu item
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
tell window "Movie Recording"
click button 3
delay 0.2
pick menu item "Maximum" of menu 1 of button 3
end tell
end tell
end tell

How to click menu item of menu of menu bar item of menu bar in Apple Script?

The menu bar:
The UI Brower:
Apple Script:
tell application "System Events"
tell process "MacID"
click menu item 9 of menu 1 of menu bar item 1 of menu bar 2
end tell
end tell
I dont know how to do it with MacID and menu items without Command Shortkeys but here is how to do it with keystroke:
tell application "System Events" keystroke "(key)" using command down

AppleScript: Menu bar item click (but no AXDescription)

I'd like to AppleScript to click a menu bar icon (not a system process) and then click on one of the menu items. I'm using OS X 10.10.
I've read that I can use the Accessibility Inspector to find the AXDescription of the item, however, I can't find it anywhere in the inspector (in fact none of the items I inspected seemed to have this property).
I also tried the method described here but get an error on line 10:
ignoring application responses
tell application "System Events" to tell process "Webcam Settings"
click menu bar item 1 of menu bar 2
end tell
end ignoring
do shell script "killall System\\ Events"
delay 0.1
tell application "System Events" to tell process "Webcam Settings"
tell menu bar item 1 of menu bar 2
click menu item "Show Webcam Settings Panel" of menu 1
end tell
end tell
System Events got an error: Can’t get menu 1 of menu bar item 1 of menu bar 2 of process "Webcam Settings". Invalid index.
There are some menu bar apps which you can click and show menu with applescript regardless of if they appear in dock.
But I am afraid you can’t access the menubar of “Webcam Settings” with applescript.
Because there isn’t key named “isAccessbiliyFocused” in the attributes.
Menu bar apps you can show their menu with applescript have that key and its value is “Yes”.
I am not quite sure about my answer but as far as I investigate this issue, my answer is probably right.

applescript for Adobe acrobat pro - running action from action wizard

I have a doubt in adobe acrobat pro..
I m using applescript to run a action from Adobe acrobat Pro => Tools => "action wizard".
actually it does only the first step in choosing the action "Rajni" from the action wizard,
but i cant click the button "Next" seen in the window, to go to the next step... and then click close button....
could any body help on this...
tell application "System Events"
tell application process "Acrobat"
tell application "Adobe Acrobat Pro" to activate
click the menu item "Rajni" of menu 1 of menu item "Action Wizard" of the menu "File" of menu bar 1
click button "Next" of window "Action: Rajni" -- here is the problem ........
end tell
end tell
Many thanks...
try to add some delay before clicking window.
click the menu item "Rajni" of menu 1 of menu item "Action Wizard" of the menu "File" of menu bar 1
delay 2
click button "Next" of window "Rajni"

Resources