在Applescript中,如何调试GUI脚本的菜单和菜单项?
我经常在 Apple 脚本中看到所有这些疯狂的东西,包括告诉菜单和菜单项、UI 元素以及所有那些疯狂的软东西来做事情。我不介意这是一种疯狂的完成事情的方式 - 只要它有效 - 但我的问题是:你如何调试那些东西?我的意思是,你怎么知道你的选项是什么?
我有苹果脚本编辑器和脚本调试器,但我不知道如何使用它们来查看选项是什么。我尝试用谷歌搜索,但没有找到任何结果。
我做了一些 Web 开发,所以我习惯使用 Firebug 来检查网页的 DOM,我只是假设应该有一些简单且类似的东西来帮助 Applescript。
想法?
I often see all this crazy stuff with Apple scripting, involving telling menus and menu items, and UI elements and all that crazy soft of stuff to do things. I don't mind that it's kind of a crazy way to get things done - as long as it works - but my question is this: How do you debug that stuff? I mean, how do you know what your options are?
I have apple script editor and script debugger, but I'm not sure how to use them to see what the options are. I've tried searching with google but I haven't come up with anything.
I do some web development so I'm used to using Firebug to examine the DOM of a web page, I just assume that there should be something easy and similar to help with Applescript.
Thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您是否在询问如何编写 GUI 脚本或如何判断应用程序中哪些 GUI 元素可用。如果是前者,请尝试从图形用户界面 (GUI) 脚本开始。
如果您想了解应用程序的 GUI 层次结构,请查看 UI 浏览器,它可以让您查看应用程序的 UI 元素并提供针对其中之一所需的信息。
I'm not sure if you're asking how to script the GUI or how to tell which GUI elements are available in an application. If the former, try starting with Graphic User Interface (GUI) Scripting.
If you want to find out what the GUI hierarchy is for an application, check out UI Browser, which will allow you to see the UI elements of an application and provide the information you need to target one of them.