Open kg345 opened 1 week ago
I don't think this is a problem on macOS Sequoia, since the way NotificationCenter
/NotificationCentre
/Notification Center
may differ from one version of English to another. If I am not mistaken, in British English, it will be NotificationCentre
.
Perhaps you can check one of those options and change it for yourself. Also, you can search through the issues because we have already discussed that in the past in the issues/PRs.
Thanks. I do see these PRs discussing some issues (localization you mentioned, other mentioning that the center needs to be open to work).
https://github.com/raycast/script-commands/pull/917 https://github.com/raycast/script-commands/pull/919
I think the issue, for me, isn't related to localization - as it is finding the NotificationCenter process/window - there's just nothing to do, in terms of actions, within it so not sure there's actually a way to get this to work. I suspect the issue is likely that the "clear" or "clear all" notifications button only appears when you hover on it with your mouse and there might not be an entry point to that action with applescript.
Considering the above, I was curious if this script then worked for anyone at any point (and whether that was a prior version of macOS).
Very good point. It will be quite complicated to know if it worked for anyone other than the author himself.
However, I don't really think there will be a final solution that works for everyone. I do think that for those whose computers the script doesn't work on, the best solution would probably be to make some changes to make it work for themselves. Perhaps this is going to be your situation, Kris.
Does sound like it probably should be named with template
to indicate it probably wont' work out of the box for everyone.
For anyone else stumbling on this - this gist discussion does have some working scripts (in particular, this one works for me if the notification pops out the notification center - though it loops through each item so can be a bit slow).
@kg345,
Even though I understand your point about using the .template
, it doesn't really fit with the idea of it.
Templates are used when the user needs to make changes to the Script Command right before its use.
As this is something that would work for a large number of people using English as their main system language, it won't require any extra changes. For others, it would be interesting to add some instructions in the Script Command itself (perhaps a troubleshooting comment) mentioning that if it doesn't work, the user would need to make certain changes.
Just chiming in to say that this script did work for me until I upgraded to Sequoia.
Running the script here results in a
Same error regardless if I group or do not group my notifications.
If I edit the script to see what actions/groups exists - I see there's: