Apple の脅威の通知と金銭目当てのスパイウェアへの対策について

ユーザー辞書ウィンドウを表示する AppleScript を Automator で実行したところ、エラーが発生した

AutomatorでのSystem S… - Apple コミュニティ

と同様のご相談です。


Apple M1 Max

Vntura バージョン13.4.1

の環境でユーザー辞書ウィンドウを表示するAppleScriptをAutomatorで実行したところ、エラーが発生しました。

エラーメッセージには「System Settingsでエラーが起きました:window "キーボード" of application process "Systerm Settings"を取り出すことはできません。」と表示されました。


どこを修正すればいいのかわからず、お力を貸していただけると幸いです。


入力したコード

open location "x-apple.systempreferences:com.apple.Keyboard-Settings.extension"
delay 1
tell application "System Settings"
tell application "System Events" to tell application process "System Settings"
tell window "キーボード"
tell group 1's splitter group 1's group 2's group 1's scroll area 1's UI element 4
tell button 2
click
end tell
end tell
end tell
end tell
end tell

* タイトルを変更しました。 Apple Inc.

* 一部編集いたしました。 Apple Inc.

MacBook Pro (2021)

投稿日 2023/06/24 14:22

返信
スレッドに付いたマーク ベストな回答

投稿日 2023/06/24 15:15

delay をもっと長くしてみるとか。


変更前

delay 1


変更後

delay 5


環境が Ventura 13.4.1 なら、もっと簡単にこんな感じでも良いかも


tell application "System Settings"
    activate
    tell pane id "com.apple.Keyboard-Settings.extension"
        reveal anchor "TextReplacements"
    end tell
end tell


動作確認: Ventura 13.4


類似の質問

返信: 3
スレッドに付いたマーク ベストな回答

2023/06/24 15:15 OBGYN への返信

delay をもっと長くしてみるとか。


変更前

delay 1


変更後

delay 5


環境が Ventura 13.4.1 なら、もっと簡単にこんな感じでも良いかも


tell application "System Settings"
    activate
    tell pane id "com.apple.Keyboard-Settings.extension"
        reveal anchor "TextReplacements"
    end tell
end tell


動作確認: Ventura 13.4


ユーザー辞書ウィンドウを表示する AppleScript を Automator で実行したところ、エラーが発生した

Apple サポートコミュニティへようこそ
Apple ユーザ同士でお使いの製品について助け合うフォーラムです。Apple ID を使ってご参加ください。