Enable Do Not Disturb in Notification Center when certain app is open

Is there a way to get Do Not Disturb to automatically turn on when a certain app is running?

In the DND preference panel, you can tell it to engage whenever you're mirroring to a TV or projector, presumably for a presentation. When I give presentations it's using GoToMeeting, WebEx, etc., so I am trying to reproduce that behavior.


Sure. Create a Keyboard Maestro macro that runs when the app launches and runs an AppleScript to turn DND on.

Then create another one for when the app quits which runs another AppleScript to turn DND off.

AppleScript can be found here: http://m.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/