从滚动区中按值选择行-AppleScript UI,Lync Automation

Pet*_*lat 2 user-interface applescript lync-2013

我正在尝试使用applescript ui编程自动化基于osx的Microsoft lync。到目前为止,我还不了解如何通过其值选择lync联系人列表中的项目。UI检查器显示以下层次结构:

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

AXValue:“音频测试服务-Verfügbar-nur语音邮件”

我尝试了这个:

告诉进程“ Microsoft Lync”以选择-????

收到一个主意真是太好了……!

Lri*_*Lri 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
Run Code Online (Sandbox Code Playgroud)

查找UI元素:

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
Run Code Online (Sandbox Code Playgroud)