Using "System Events" to select multiple items in AXOutline
My first approach was:
-- Close all but one window in Finder, and click on toolbar button (top-right) to hide extra panes
tell application "System Events"
set myOutline to outline 1 of scroll area 1 of splitter group 1 of window 1 of process "Finder"
set value of attribute "AXSelected" of row 1 of myOutline to true
set value of attribute "AXSelected" of row 2 of myOutline to true
end tell
What this does is select row 1, then row 2 but de-selecting row 1.
Then I noticed that the "AXSelectedRows" attribute of the outline is writable. So I tried:
tell application "System Events"
set myOutline to outline 1 of scroll area 1 of splitter group 1 of window "PRs" of process "Finder"
set value of attribute "AXSelectedRows" of myOutline to {row 1 of myOutline, row 2 of myOutline}
end tell
But this seems to have no effect whatsoever on the selection. In fact setting it to anything that won't generate an error will have no effect. If an error occurs in referencing then selection is cleared.
Anybody know what the secret to getting multi-selection working with AXOutline?
Thanks,
Matt
MacPro, Mac OS X (10.6.5)