我想创建一个AppleScript点击菜单但我不能永远使用我,这里的脚本是什么菜单我想:AppleScript的点击菜单栏选项
ELEMENT :
Role : menu item
Title: "sign in As..."
Description :
Help:
Application: SytemUIServer
ELEMENT PATCH (starting at leaf element):
menu Item "Sign in As..." (menu item 12)
menu (menu 1)
menu extra (menu bar item 2)
menu bar (menu bar 1)
application "SystemUIServer"
所以我做了几个脚本,上一次是
ignoring application responses
tell application "System Events" to tell process "SystemUIServer"
click menu bar item 2 of menu bar 1
end tell
end ignoring
do shell script "killall System\\ Events"
delay 0.1
tell application "System Events" to tell process "SystemUIServer"
tell menu item 12 of menu 1 of menu bar item 2 of menu bar 1
click
end tell
end tell
而且我刚刚认识到,位置可改变(有一段时间我想点击的项目是菜单项12某个时候它的10等)
元: 作用:菜单项 标题: “登录为...” 说明: 帮助: 应用:SytemUIServer 元PATCH(开始于叶元素): 菜单项目“登录为。 ..“(菜单项12) 菜单(菜单1) 菜单额外(菜单栏项目2) 菜单栏(菜单栏1) 应用程序”SystemUIServer“ –