2

我正在尝试使用 applescript ui 编程自动化基于 osx 的 microsoft lync。到目前为止,我不知道如何通过值来选择 lync 联系人列表中的项目。UI Inspector 显示了这个层次结构:

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

AXValue:“音频测试服务 - Verfügbar - nur Voicemail”

我试过这个:

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

收到一个想法会很棒……!

4

1 回答 1

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

查找 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
于 2013-07-25T18:22:46.593 回答