Skip to content

Instantly share code, notes, and snippets.

@milanpanchal
Last active November 17, 2020 21:07
Show Gist options
  • Save milanpanchal/fdc9f0c609cd82b3f2f951cbbe190382 to your computer and use it in GitHub Desktop.
Save milanpanchal/fdc9f0c609cd82b3f2f951cbbe190382 to your computer and use it in GitHub Desktop.
Clearing All Notifications in Mac OS X through Apples Automator App by writing JavaScript Code
// https://medium.com/@milanpanchal24/clearing-all-notifications-in-mac-os-x-3be0a16eb2a3
function run(input, parameters) {
var app = Application('System Events');
app.includeStandardAdditions = true;
app.processes.byName('NotificationCenter').windows.buttons[0].click();
return input;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment