I am trying to get the keyboard to focus the right menu bar (Bartender 3 has this exact same feature). In System Preference, Shortcut, Keyboard there is a shortcut but it works only for the left menu.
I've tried some AppleScript but I am total noob.
tell application "System Events" to tell process "SystemUIServer" tell (activate menu bar 2) end tell end tell
this is with a shortcut from bartender 3. Basically get the focus on the first menu (on the menu bar on the top right) so I can move with the keyboard.
It could work if I click the menu with the mouse (so scripting applescript to click) but I believe that I need to know the position of the last menu or the name. Since those menu dont really have an order they might change (they are created with Hammerspoon so I might delete them, change them etc.)
Sure I could just click the menu that is always there and move from there but I would like to know how to recreate Bartender 3 shortcut.