Skip to content

Instantly share code, notes, and snippets.

@Dakta
Created October 19, 2014 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dakta/2d5ee3f48365f9060579 to your computer and use it in GitHub Desktop.
Save Dakta/2d5ee3f48365f9060579 to your computer and use it in GitHub Desktop.
Activate Notification Center from AppleScript and Switch Panes
on displayNotificationCenterToday()
tell application "System Events"
click menu bar item "Notification Center" of menu bar 2 of process "SystemUIServer"
click radio button "Today" of radio group 1 of window "NotificationTableWindow" of process "NotificationCenter"
end tell
end displayNotificationCenterToday
on displayNotificationCenterNotifications()
tell application "System Events"
click menu bar item "Notification Center" of menu bar 2 of process "SystemUIServer"
click radio button "Notifications" of radio group 1 of window "NotificationTableWindow" of process "NotificationCenter"
end tell
end displayNotificationCenterNotifications
-- this plus Accessibility Inspector is how I figured out what to click
--tell application "System Events"
-- get properties of every menu bar item of every menu bar of process "SystemUIServer"
-- get properties of menu bar 2 of process "SystemUIServer"
-- click menu bar item "Notification Center" of menu bar 2 of process "SystemUIServer"
-- click radio button "Today" of radio group 1 of window "NotificationTableWindow" of process "NotificationCenter"
--end tell
--displayNotificationCenterNotifications()
--displayNotificationCenterToday()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment