Hello, I’m really puzzled.
activate application "iTunes"
tell application "System Events" to tell application process "iTunes"
tell window 1
--class of every UI element
-->{button, button, button, button, slider, button, scroll area, radio group, text field, scroll area, UI element, scroll area, scroll area, browser, button, button, button, button, static text, button, button, static text, button, button, button, button}
position of every scroll area
--> {{665, 44}, {303, 91}, {1290, 114}, {673, 91}}
size of every scroll area
--> {{475, 44}, {185, 827}, {213, 804}, {616, 827}}
(*
class of every UI element of scroll area 3
--> {UI element}
class of every UI element of first outline of scroll area 3
--> error number -1719 from outline 1 of scroll area 3 of window 1 of application process "iTunes"
*)
class of every UI element of last scroll area
--> {outline, scroll bar, scroll bar}
class of every UI element of first outline of last scroll area
--> {group, column, column, column, column, column, column, column, column, column, column, column, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row, row}
tell first outline of last scroll area
tell row 25
position
--> {1456, 1014}
size
--> {1177, 19}
value of first text field
--> "Little Numbers"
end tell # row 25
tell (first row whose value of text field 1 is "1901")
if not value of attribute "AXSelected" then
set value of attribute "AXSelected" to true
repeat until value of attribute "AXSelected" is true
delay 0.1
end repeat
end if
# Now the wanted row is selected
set {xTop, yTop} to position
tell application "ASObjC Runner"
{xTop + 1, yTop + 1}
click button once at result holding down {control}
{xTop + 5, yTop + 2}
set mouse location to result
# The contextual menu is visible
end tell
delay 0.5
class of UI elements
end tell # (first row whose value of text field 1 is
end tell # first outline of last scroll area
class of UI elements
# I am really puzzled, I don't see the menu object.
--> {button, button, button, button, slider, button, scroll area, radio group, text field, scroll area, UI element, scroll area, scroll area, browser, button, button, button, button, static text, button, button, static text, button, button, button, button}
end tell # window 1
end tell # System Events & process
(1) Here, the tracks aren’t listed in scroll area 3 but in scroll area 4.
(2) the script reveal the pop up menu but I’m unable to find its descriptor.
Yvan KOENIG (VALLAURIS, France) mercredi 10 octobre 2012 19:49:02