Hi, I am trying to click “Duplex Scan” which is the 1st menu item available when you right click on “ScanSnap Manager” on the Dock. I currently have a script which uses the UI interface I am trying to develop a faster script. With the new script I can’t seem to get to the menu item I want to possibly trigger “Duplex Scan” in the background as it’s much faster than UI scripting.
This is the new script that I am currently working on which is giving me problems:
activate application "Dock"
tell application "System Events"
tell process "Dock"
click menu item 1 of menu 1 of UI element "ScanSnap Manager" of list 1
end tell
end tell
Error message:
System Events got an error: Can’t get menu 1 of UI element “ScanSnap Manager” of list 1 of process “Dock”. Invalid index.
This script is the current script that I use which works perfectly:
tell application "System Events"
tell process "Dock"
tell list 1
perform action "AXShowMenu" of UI element "ScanSnap Manager"
delay 0.12
keystroke "Dup"
keystroke return
end tell
end tell
end tell