我正在尝试使用Applescript来更改警报类型。
我尝试了以下代码,附加了屏幕截图供参考。
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.notifications"
end tell
tell application "System Preferences"
reveal pane id "com.apple.preference.notifications"
end tell
tell application "System Events" to tell window 1 of process "System Preferences"
repeat with r in rows of table 1 of scroll area 1
if name of UI element 1 of r is "NotiNoti" then
set selected of r to true
exit repeat
end if
end repeat
--click checkbox "Badge app icon" of group 1
click radio button "AXNotificationCenterAlert" of group 1
end tell
Key 应该选择单选按钮(请为每个按钮提供按键)?
答案 0 :(得分:0)
它适用于这一行变化:
click radio button "Alerts" of radio group 1 of group 1
如果您想使用其他人,请使用以下任何一项:
"None" or "Banners" or "Alerts"