applescript for Adobe acrobat pro - running action from action wizard - applescript

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"

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

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 Adobe Acrobat Pro Save Image To PDF

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.

Using AppleScript to click the plus (+) button in a preferences window

Using AppleScript I would like to automate the creation of a new user accounts on multiple machines. I'm trying to use UI Scripting and cannot seem to be able to do a click command on the "Add Account" (+) button in the iChat Accounts Preference window. I've tried to use the Accessibility Inspector.app to infer the name of the button but I still cannot seem to access it via AppleScript.
According to Accessibility Inspector.app the button has the following attributes:
AXRole: AXButton
AXRoleDescription: button
AXHelp: <nil>
AXEnabled: YES
AXFocused (W): NO
AXParent: <AXGroup>
AXWindow: <AXWindow:AXStandardWindow>
AXTopLevelUIElement: <AXWindow:AXStandardWindow>
AXPosition: x=225.00 y=462.00
AXSize: w=23.00 h=22.00
AXTitle: <empty string>
AXIdentifier: _NS:27
AXDescription: Add Account
Here is a sample starter AppleScript that will get you to the Accounts Preference window:
tell application "iChat"
activate
tell application "System Events"
tell process "iChat"
tell menu bar 1
click menu item "Preferences…" of menu "iChat"
end tell
click button "Accounts" of tool bar 1 of window 1
click button "Add Account" of window "Accounts"
end tell
end tell
end tell
Please note that line 9 is what I'm trying to get working. Below you will find a link to a screenshot of the iChat Accounts Preference window with an arrow pointing to the button that I'm trying to access. Also note that I know that I can just use "keystroke tab" to get to the (+) button, but this will not always work as the number of times you must press tab changes depending on the type of accounts that you already created in iChat.
iChat Account Preferences Window
Not every Ui object has a title, so in those cases you can just use the item number - note that you need to include the entire hierarchy shown in the Inspector window.
tell application "iChat"
activate
tell application "System Events"
tell process "iChat"
tell menu bar 1 to click menu item "Preferences…" of menu "iChat"
delay 0.5
tell window 1
click button "Accounts" of tool bar 1
delay 0.5
click button 1 of group 1 of group 1
end tell
end tell
end tell
end tell

Resources