![]() ![]() 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 and it displays the following in the terminal:.it dismisses the top-most notification ( test 3).Note: If I run the script again, starting from the ungrouped state: I'll try messing around with it to see if I can make it work with modifications. Selector:_internal_handleCustomActionWithUiAction:" of group 1 of UI element 1 of scroll area 1 of window "Notification Center" of application process "NotificationCenter". andrew.applescript:370:377: execution error: System Events got an error: Can’t get action "Name:Clear All ![]() the terminal displays the following error.the grouped notifications become ungrouped (so I see test 3, test 2, and test 1 stacked top to bottom in the notification area. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |