试图在我的 Mac 上重现右键单击上下文菜单。
我找到了这样一篇文章:
https://beebom.com/how-right-click-using-keyboard-mac/
我这样做了,但是当我单击键盘快捷键时,我得到Finder的菜单不是当前选择的文件/文件夹菜单。
这是一个apple script用过的,
on run {input, parameters}
tell application "System Events" to set frontApp to name of first process whose frontmost is true
tell application "System Events"
tell application process frontApp
set _selection to value of attribute "AXFocusedUIElement"
tell _selection to perform action "AXShowMenu"
end tell
end tell
return input
end run
花了几个小时试图让每个Windows用户都能使用这个基本且显而易见的功能,浪费了时间并且非常令人沮丧!
我认为代码是正确的,也许我的计算机上有一些特定的东西阻止它按预期工作?
请帮忙 :-)