How to Select an Item in an App Menu Bar?

After much trial and error I frankensteined this code for my purposes from a apple script from Tom's answer to a somewhat similar question a couple years ago. It would be neat to have this run in the background without actually opening up the Menu but it's not of major importance.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "System Events"
    tell application process "Bear"
        tell menu bar 1
            tell menu bar item "Note"
                try
                    with timeout of 0.1 seconds
                        perform action "AXPress"
                    end timeout
                end try
            end tell
        end tell
    end tell
end tell

do shell script "killall 'System Events'"

tell application "System Events"
    tell application process "Bear"
        tell menu bar 1
            tell menu bar item "Note"
                tell menu 1
                    tell menu item "Open In New Window"
                        perform action "AXPress"
                    end tell
                end tell
            end tell
        end tell
        set frontmost to true
    end tell
end tell