如何使用applescript在系统首选项中单击此按钮?
我正在尝试使用applescript禁用Siri,我需要单击确认按钮。 这是我的密码:如何使用applescript在系统首选项中单击此按钮?,applescript,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 check
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"
您试图在工作表上单击的按钮,例如:
更改:
click button "Turn Off" of window "Dictation" of window "Siri"
click button "Turn Off" of sheet 1 of window "Siri"
至:
click button "Turn Off" of window "Dictation" of window "Siri"
click button "Turn Off" of sheet 1 of window "Siri"
完美的非常感谢。