Hi KM User, I had an Applescript under macOS Catalina with which I could close notifications via the Notification Center:
my closeNotification() on closeNotification() tell application "System Events" to tell process "Notification Center" click button 1 of first item of windows end tell end closeNotification
Unfortunately Apple changed the design under macOS Big Sur and did not integrate the buttons in this form anymore:
activate application "NotificationCenter" tell application "System Events" tell process "Mitteilungszentrale" click button 1 of group 1 of UI element 1 of scroll area 1 of window 1 end tell end tell
"Mitteilungszentrale" is written there, because I use a german macOS.
Unfortunately I always get an error message:
Can anyone help me there or would they have a different solution for macOS Big Sur?