I am able to do the right click mouse event by using below script:

tell application "System Events" tell process "Finder" set target_index to 1 set target to image target_index of group 1 of scroll area 1 tell target to perform action "AXShowMenu" end tell end tell

BUT now I want to click on the menu item... let say "Get Info" then how I meet this goal? any clue?

有帮助吗?

解决方案

tell application "System Events"
    tell process "Finder"
        set target_index to 1
        set target to image target_index of group 1 of scroll area 1
        tell target to perform action "AXShowMenu"
    end tell
    keystroke "Get Info" & return
end tell
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top