How to switch between Today and Notifications tabs in Notification Center on macOS Sierra? I want to be able to switch between the tabs (Today and Notifications tabs) in Notification Center using a keyboard shortcut. Any way of doing it on macOS Sierra?

I know it was possible on Yosemite, but I never had Yosemite so I couldn't verify that.

Edit: I want to be able to run an apple script, not use a keyboard shortcut. Using the apple script I can then place it in a third-party program to get my results.

Also, the code below worked partially. For starters, is it possible to place an if/else at the beginning so it works like this:

if Notification Center is already opened, then move onto the next thing (which would be switching between the Today and Notification buttons) but if it is not open then open it and switch the buttons.
I did a little googling and couldn't find a native keyboard shortcut other then to just open Notification Center, to whatever view it was last on, and this has to be User set in System Preferences > Keyboard > Shortcuts > Mission Control > Show Notification Center. This of course just open Notification Center to whatever view it was last on.

However if you go to System Preferences > Keyboard > Shortcuts, there is "Full Keyboard Access: In windows and dialogs, press Tab to move keyboard focus between:" and two radio buttons, "Text boxes and lists only" (the default) and "All controls". If you select "All controls", then you might be able to use, e.g. tab, enter, arrow keys to navigate the Notification Center. I'm not able to test that at the moment and why I said "... might be able to use ...".

That leaves an AppleScript workaround to be used in either a third-part app that can use the script assigning a keyboard shortcut or an Automator service that a keyboard shortcut could be assigned to.

The AppleScript code below toggles the state of the two buttons in Notification Center.

try
    tell application "System Events"
        tell process "SystemUIServer"
            click menu bar item "Notification Center" of menu bar 1
        end tell
        tell application "System Events"
            tell process "Notification Center"
                if value of radio button "Today" of radio group 1 of window "NotificationTableWindow" is equal to 1 then
                    click radio button "Notifications" of radio group 1 of window "NotificationTableWindow"
                else
                    click radio button "Today" of radio group 1 of window "NotificationTableWindow"
                end if
            end tell
        end tell
    end tell
end try


You can also modify the code to just act on just a given button if you want. It should be obvious how to modify it however fell free to ask if you need additional help.