简体   繁体   English

选择带有JavaScript AppleScript的弹出菜单

[英]Selecting a popup menu with javascript applescript

I have a AXPopUpButton that brings up a contectual menu if you click it. 我有一个AXPopUpButton,如果您单击它会弹出一个菜单。 However, I can't seem to access the menu with javascript applescript UIAutomation. 但是,我似乎无法使用Javascript Applescript UIAutomation访问菜单。

pop = item.popUpButtons.byName("Select")
pop.click()
delay(0.5)

Then the menu shows up on the screen. 然后菜单显示在屏幕上。 However, "pop.menus()", "pop.menuItems()", "pop.menus.menuItems()" all returns length of 0. How can I access the popup menus using UIAutomation in javascript? 但是,“ pop.menus()”,“ pop.menuItems()”,“ pop.menus.menuItems()”都返回0长度。如何使用JavaScript中的UIAutomation访问弹出菜单? Thanks! 谢谢!

After clicking you should call entireContents() for the whole window. 单击后,应为整个窗口调用entireContents() And then, choose the necessary one pop up selection. 然后,选择必要的一个弹出选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM