ライオンズのスクロールバーの表示を変更するアップルスクリプトを作成しようとしています([システム環境設定]> [一般])。普段は「入力デバイスに基づいて自動的に」に設定し続けるのが好きですが、自宅ではWacomタブレットを使用しているので、Alwaysに切り替える必要があります
これは私がこれまでに持っているものです:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.general"
end tell
tell application "System Events"
if UI elements enabled then
try
tell process "System Preferences"
click radio button "Always"
end tell
end try
end if
end tell
しかし、私はいつもエラーになってしまいます
--> error number -1728 from «class radB» "Always" of «class prcs» "System Preferences"
「ラジオをクリック...」の行
いろいろバリエーションを試してみました
click radio button 3 of Window 1
click radio button 3 of radio group 1 of window 1 -- error number -1719
私は明らかに何か間違ったことをしていますが、何がわからないのです。