Search code examples
macosgrowl

Clear growl notifications from the commandline


How can I clear growl notifications from the command line?

I have a server running all my unit tests and when an error/failure arrives I get a growl notification with the number of errors (also a little arduino light next to my desk changes color), so when I fix the error I want to automatically clear the growl errors. Is there a way to send growl a message or run something in the command line to clear them?

I could be evil and just kill growl and restart it. I have the latest version bought in the appstore and I am using osx/lion if that helps

Thanks


Solution

  • I believe this cannot be done from the GAB/GNTP layer, but it can definitely be done via AppleEvents.

    See http://growl.info/documentation/applescript-support.php#growlcontrol for details on the Growl Control Suite. The example script shows how to do all of the various things you can do, including closing all open notifications.

    If you don't know how to run an AppleScript from the command line, see the osascript command.