Is there any way to get an AppleScript to access the menu items that come up when you right click on a dock icon?
Specifically, here\'s what I want to do:
I
Not sure if you are still interested but...
tell application "Dock"
activate
end tell
tell application "System Events"
tell process "Dock"
set frontmost to true
activate
tell list 1
perform action "AXShowMenu" of UI element "Google Chrome"
delay 1
repeat 4 times -- count number of items to the one you want
key code 126 -- up arrow
-- key code 125 -- down arrow
end repeat
delay 1
repeat 2 times
key code 36 -- return key
end repeat
end tell
end tell
end tell