^how do i trigger a menu item, from a third party menubar icon app^, I tried the app title "Display Rotation", to no avail.
Usually with AppleScript GUI scripting. Here is an example:
set applicationProcess to "Application Process Name" -- see Activity monitor
set menuItem to "Menu Item to click" -- the exactly name
tell application "System Events"
tell application process applicationProcess
tell menu bar 2 -- (sometimes 1)
tell menu bar item 1
perform action "AXPress"
tell menu 1
tell menu item menuItem
perform action "AXPress"
end tell
end tell
end tell
end tell
end tell
end tell
However "Display Rotation" is not an app in the usual sense (NSApplication). It is marked as "NSPrincipalClass". I don't know if this is the reason, but the menu is not accessible and is not recognized by the UI Browser. The app does not seem to be scriptable with AppleScript GUI scripting. For other apps you can try the sample.