【问题标题】:Right click on desktop icon then click on menu item右键单击桌面图标,然后单击菜单项
【发布时间】:2014-03-15 11:12:57
【问题描述】:

我可以使用下面的脚本来做鼠标右键事件:

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

但现在我想点击菜单项......让我们说“获取信息”然后我如何实现这个目标?有什么线索吗?

【问题讨论】:

    标签: macos applescript right-click


    【解决方案1】:
    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
    

    【讨论】:

    • 简要说明不同之处会有所帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-25
    • 2022-08-14
    • 2011-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多