Getting button list from a window menu - AppleScript -


i can main menu item , have been able use system events select , click specific button in window. running issue want 'handles' of buttons belong popup 'sheet'. instance, "airplay" button in itunes:

in case there 2 items

i can button click open sheet using similar this:

click button 10 of window "itunes" of application process "itunes" of application "system events" 

and use key code manually scroll , down, though looking efficient , elegant solution of selecting specific button want (by name ie: "computer" in case)

i using accessibility inspector , can info menu:

<axapplication: “itunes”> <axwindow: “itunes”> <axmenu> <axmenuitem: “airport express”> attributes: axrole: “axmenuitem” axroledescription: “menu item” axparent: “<axmenu>” axenabled: “1” axposition: “x=1070 y=798” axsize: “w=146 h=22” axtitle: “airport express” axhelp: “(null)” axselected (w): “1” axmenuitemcmdchar: “(null)” axmenuitemcmdvirtualkey: “(null)” axmenuitemcmdglyph: “(null)” axmenuitemcmdmodifiers: “0” axmenuitemmarkchar: “(null)” axmenuitemprimaryuielement: “(null)” actions: axcancel - cancel axpress - press 

so these popups have specific title? select button 1 of sheet 1 of...

i think easy , on thinking issue.

cheers! bo

what ive tried:

 --click menu item "computer" of menu 1 of window "itunes" of application process "itunes" --tell application "system events" tell process "itunes" -- tell menu 1 of menu bar item 1 of menu bar 2 -- click menu item "copy" -- end tell --end tell --click (every button value of attribute "axtitle" "computer") of window "itunes" of application process "itunes" --tell window 1 --click button "computer" of tool bar 1 of window "itunes" of application process "itunes" -- click button 1 of group 1 of group 1 of window "itunes" of application process "itunes" --end tell click (menu item 2 of every menu item attribute "axroledescription" "menu item") of window "itunes" of application process "itunes" --click (button description "menu item") of window "itunes" of application process "itunes" 

it's not possible on customized menu : <window "itunes"> --> <menu>

it's possible on popup button. <window "itunes"> --> <popup button> --> <menu>

you must continue use key code.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -