How do I clear All OS X notifications with 1 click? I have notifications in the OSX Notification Center, as for most of my apps I am using the setting, "Show in Notification Centre: 10 Recent Items"
This is a good setting but rather than have a very full Notification Center, I would still like to clear it from time to time with 1 click.

I am using Yosemite 10.10.3
tell application "System Events"
    tell process "NotificationCenter"
        set numwins to (count windows)
        repeat with i from numwins to 1 by -1
            click button "Close" of window i
        end repeat
    end tell
end tell


Copy and Paste the above code into AppleScript Editor
Enable Script Editor in Accessibility