我可以使用以下脚本执行右键单击鼠标事件:
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
但现在我想点击菜单项...让我们说"获取信息"那我怎么实现这个目标?任何线索?
答案 0 :(得分:0)
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