I’ll check maybe something with the localization fails for is_is
I reverted it:
defaults read NSGlobalDomain AppleLocale
en_US
so that doesn't seem to be the problem. Running scripts just gives missing value:
don't know what shared secret is. shortcut action doesn't work either.
languages only fully change after restarting macOS - especially notification center is pretty annoying in that regard.
I’ll try later, currently not in my Mac
Already restarted and shut down for good measure. Only locale I have is with excel can't imagine that's doing anything:
defaults read NSGlobalDomain AppleLocale
en_US
defaults read com.microsoft.Excel AppleLocale
is_IS
weird, then it must be stuck somewhere else. Do other Apple Scripts still work for you?
just in general? yeah definitely
Hey, didn't even realize this action existed but I like it!
I am wondering, does the notification "drawer" have to be open for notifications to be closed automatically? Is there a way to close notifications without having to open that?
My problems never get solved on here
Don’t know how to upvote but I have the same problem.
@Andreas_Hegenberg Is there an update coming for this?
unfortunately I haven’t been able to reproduce it yet :-/
I'm on macOS 15.1 beta and none of the solutions here work. There is even an Alfred workflow that also stopped working since I installed the beta.
Can't run the script nor the command successfully on 15.0.1
edit: Ohhhh I see now that you have to open the drawer for what I want to work... So, I can easily edit the shortcut to open the center and then kill all notifications, but then I don't know how to wait until all notifications are dismissed before closing the center.
Additionally, why doesn't the shortcut simply use the "Clear All" button? It kinda sucks having to wait for all the animations.
edit2: I ended up with the following script.
tell application "BetterTouchTool"
trigger_action "{ BTTPredefinedActionType: 122}" -- Toggle Notification Center (Open)
end tell
tell application "System Events"
tell process "Notification Center"
tell window 1
tell group 1
tell group 1
tell scroll area 1
set elementList to every UI element
repeat with anElement in elementList
if role of anElement is "AXOpaqueProviderGroup" then
set buttonList to (every UI element of anElement whose role is "AXButton")
if (count of buttonList) > 0 then
try
click (item -1 of buttonList) -- Click the X button which causes the button to turn into "Clear All"
click (item -1 of buttonList) -- Click to clear all notifications!
end try
end if
end if
end repeat
end tell
end tell
end tell
end tell
end tell
end tell
tell application "BetterTouchTool"
trigger_action "{ BTTPredefinedActionType: 122}" -- Toggle Notification Center (Close)
end tell
return "Notifications dismissed successfully."
I've never had any problems with BTT's "Close All Notification Alerts / Notification Center" action until I installed Sequoia 15.1 on Monday (i.e., the standard version, not RC or beta, etc.). Now mine's broke, too (BTT V 4.832)!
However, the Alfred Workflow recommended by @Cetkovic above works just fine on my end. Thanks!
In case it's helpful @Andreas_Hegenberg for fixing the BTT action, that workflow uses the following javascript for Sequoia notifications:
Application("System Events")
.applicationProcesses.byName("NotificationCenter")
.windows[0]
.groups[0]
.groups[0]
.scrollAreas[0]
.uiElements()
.map(banner => banner.actions().slice(-1)[0])
.forEach(banner => banner.perform())
I confirm, the Alfred workflow works now; it wasn't working during the macOS 15.1 beta.
4.833 alpha should fix this! (uploading now)
The alfred workflow didn't always clear all notifications - at least on my system. Especially when the notification center was open. I hope the BTT action does always clear all now.
Thanks, @Andreas_Hegenberg! Your most recent update fixed everything on my end. Cheers!
I get "missing value" for both this version of the script and your previous version.
Confirmed also fixed on my end.