Created
October 19, 2014 21:19
-
-
Save Dakta/2d5ee3f48365f9060579 to your computer and use it in GitHub Desktop.
Activate Notification Center from AppleScript and Switch Panes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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