2

i'm trying to automate osx based microsoft lync using applescript ui programming. Up to now i did not get an idea in how select an item of the lync contact list by its value. The UI Inspector shows this hierarchy:

AXApplication-AXWindow:AXStandradWindow-AXScrollarea-AXOutline-AXRow:AXOutlineRow-AXStaticText

AXValue: "Audio Test Service - Verfügbar - nur Voicemail"

I tried this:

tell process "Microsoft Lync" to select - ????

It would be great receiving an idea…!

Peter Samulat
  • 21
  • 1
  • 2

1 Answers1

6
tell application "System Preferences"
    reveal anchor "output" of pane id "com.apple.preference.sound"
end tell
tell application "System Events" to tell process "System Preferences"
    tell table 1 of scroll area 1 of tab group 1 of window 1
        select (row 1 where value of text field 1 is "Internal Speakers")
    end tell
    --tell table 1 of scroll area 1 of tab group 1 of window 1
    --if selected of row 1 then
    --set selected of row 2 to true
    --else
    --set selected of row 1 to true
    --end if
end tell

Finding UI elements:

tell application "System Events" to tell process "System Preferences"
    class of UI elements of window 1
    --class of UI elements of group 1 of window 1 -- etc
end tell
Lri
  • 26,768
  • 8
  • 84
  • 82