Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top