如何使用 applescript 在系统偏好设置中单击此按钮?
How do I click this button in System Preferences with applescript?
我正在尝试使用 applescript 禁用 Siri,我需要单击确认按钮。
这是我的代码:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.speech"
end tell
delay 0.5
tell application "System Events"
tell process "System Preferences"
-- click checkbox "Enable Ask Siri" of window "Siri"
if value of checkbox "Enable Ask Siri" of window "Siri" is 1 then
click checkbox "Enable Ask Siri" of window "Siri"
end if
click button "Turn Off" of window "Dictation" of window "Siri"
end tell
end tell
下一行是行不通的
click button "Turn Off" of window "Dictation" of window "Siri"
您尝试点击 sheet 的 按钮,例如:
变化:
click button "Turn Off" of window "Dictation" of window "Siri"
收件人:
click button "Turn Off" of sheet 1 of window "Siri"
我正在尝试使用 applescript 禁用 Siri,我需要单击确认按钮。 这是我的代码:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.speech"
end tell
delay 0.5
tell application "System Events"
tell process "System Preferences"
-- click checkbox "Enable Ask Siri" of window "Siri"
if value of checkbox "Enable Ask Siri" of window "Siri" is 1 then
click checkbox "Enable Ask Siri" of window "Siri"
end if
click button "Turn Off" of window "Dictation" of window "Siri"
end tell
end tell
下一行是行不通的
click button "Turn Off" of window "Dictation" of window "Siri"
您尝试点击 sheet 的 按钮,例如:
变化:
click button "Turn Off" of window "Dictation" of window "Siri"
收件人:
click button "Turn Off" of sheet 1 of window "Siri"