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:
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
Post a Comment