![]() Again this took a bit of experimentation. Then I figured out the coordinates of the close button that appears on hover. Then I figured out the coordinates of the time in the top-right, which when clicked, opens the notification centre. It's available via Homebrew with brew install cliclick. This has been annoying me too, but I managed to get something close working today.įirst I installed cliclick, a command line tool that lets you simulate mouse movement and clicks. I found an Automator JavaScript action which works: function run(input, parameters) notifications found.`) A minor tweak fixes this issue for me: activate application "NotificationCenter" I think the issue is the inner repeat over the actions: it's trying to access actions in some cases after the window is closed. Yes, thank you for posting the script, received an error similar to when using it as is. If description of theAction is "Close" then If description of theAction is "Clear All" then Set theWindow to group 1 of UI element 1 of scroll area 1 of window "Notification Center" activate application "NotificationCenter" As I've stated in the comments, I don't know much about AppleScript, so perhaps someone who knows what they're doing can tell us how to improve the performance. This seems to do a reasonable job of closing all windows, but it's sometimes slow to execute. I'm posting a most robust version that evolved from my initial post. Selector:_internal_handleCustomActionWithUiAction: of group 1 of UI element 1 of scroll area 1 of window Notification Center of application process NotificationCenter
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |