With the desktop no longer working correctly, I am trying to access the preference menu item in dropbox. I searched around and found this AppleScript that will open the correct menu item, however, I am not sure how to program it to select the "Preferences..." menu item.
tell application "System Events"
tell UI element "Dropbox"
tell menu bar item 1 of menu bar 2
perform action "AXPress"
I think in MacOS some menus (like the Menu Bar itself) also allow you to press the first letter of each menu item. You may have to press it more than once if there are multiple items with the same first letter. After that, you still have to press Enter, but it may save some time this way.