在 UIElementInspector 中查看元素编号
因此,当我查看 UIElementInspector 中的 UI 项时,我会看到类似 AXButton
的内容。太好了,现在我想对 AXButton 执行操作,但问题是我最终做了这样的事情:(是的,我实际上已经这样做了,愚蠢的我)
perform action "AXPress" of pop up button 2 of group 1 of group 1 of group 1 of group 3 of UI element 1 of scroll area 1 of group 2...
现在我必须手动尝试什么按钮什么组什么什么的,以便查看该 UI 项目所属的位置,以便我可以对其进行操作。我想知道是否有一些不那么笨拙的方法来查看我应该输入哪些数字,因为有时我什至无法找到某些 AXButton
手动隐藏的位置。
So when I look at a UI item in UIElementInspector, I see stuff like AXButton
. Great, now I want to perform an action on that AXButton
, but the problem is I end up doing something like this: (yes I have actually done this, stupid me)
perform action "AXPress" of pop up button 2 of group 1 of group 1 of group 1 of group 3 of UI element 1 of scroll area 1 of group 2...
Now I have to manually try out what button # of what group # of whatever in order to see where that UI item belongs so I can do stuff on it. What I'm wondering is if there's some less kludgey way of seeing what numbers I should put in, as sometimes I can't even find where some AXButton
is hiding manually.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,UIElementInspector 很难使用。我不使用它,因为它对我来说太难了。我建议在此处尝试 UI 浏览器。
找到东西的确切路径要容易得多……但它不是免费的。查找内容的唯一其他方法是让 applescript 找到它。假设您想在窗口中找到一个标题为“Press”的按钮。你可以做这样的事情......
显然有时窗口中有组(和其他东西),按钮可能位于其中之一,所以你可能必须做这样的事情......
我希望有所帮助。
Yep, UIElementInspector is difficult to use. I don't use it because it's too difficult for me. I'd suggest trying UI Browser here.
It's a lot easier to find the exact path to stuff... but it's not free. The only other way to find things is to let applescript find it. Suppose you wanted to find a button titled "Press" in a window. You could do something like this...
Obviously sometimes there's groups in a window (and other stuff), and the button may be in one of them, so you may have to do something like this...
I hope that helps.