在 Applescript 中,如何才能像 Spotlight 一样进入“帮助”菜单“搜索”字段?
在 OS X 中,为了从键盘快速访问菜单项,我希望能够键入组合键,让它运行脚本,并使脚本将焦点集中在“帮助”菜单中的“搜索”字段。 它应该像 Spotlight 的组合键一样工作,所以如果我再次运行它,它应该会关闭菜单。 我可以使用 Quicksilver 运行脚本,但是如何编写脚本呢?
In OS X, in order to quickly get at menu items from the keyboard, I want to be able to type a key combination, have it run a script, and have the script focus the Search field in the Help menu. It should work just like the key combination for Spotlight, so if I run it again, it should dismiss the menu. I can run the script with Quicksilver, but how can I write the script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
或者,点击 cmd-? 并且不要弄乱脚本。 :-) 这将重点放在帮助菜单的搜索字段中。
Alternatively, hit cmd-? and don't mess with the script. :-) That puts key focus in the help menu's search field.
这是我想出的脚本。
Here is the script I came up with.