1

ユーザー補助デバイスのアクセスを有効にするチェックボックスを自動的に選択しようとしています。

ここに画像の説明を入力

以下は、正しい設定ウィンドウを開く私のコードです。ただし、チェックボックスを設定していません。

tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.universalaccess"
end tell

tell application "System Events"

    set theCheckbox to checkbox "Enable access for assistive devices"
    tell theCheckbox
        if not (its value as boolean) then click theCheckbox
    end tell

end tell
4

1 に答える 1

1

有効に設定するだけです

tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.universalaccess"
end tell

tell application "System Events" to set UI elements enabled to true
于 2013-10-08T19:14:53.600 に答える