0
我正在嘗試更改警報類型的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
什麼重點應該有選擇單選按鈕(請提供爲他們每個人的鑰匙)?
不知道我明白你的問題的權利,但我認爲你剛剛錯過了「無線電組」部分。就像'點擊單選按鈕「None」/「Banners」/「Alerts」1組播放組1# – user309603 2014-09-03 15:06:59
即所有它的工作@ user309603。您可以將其添加爲答案... – 2014-09-03 15:58:48