2

AppleScript UI プログラミングを使用して、osx ベースの Microsoft Lync を自動化しようとしています。今まで、lync の連絡先リストの項目をその値で選択する方法がわかりませんでした。UI インスペクターには、次の階層が表示されます。

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

AXValue: "オーディオ テスト サービス - Verfügbar - nur ボイスメール"

私はこれを試しました:

プロセス「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 に答える