Hi, I tried that, but no luck. I have the impression (possibly harebrained ) that the problem (which exists with Calculator also) may be that UiSpy is treating ‘Menubar’ not as a MenuBar, but as a ‘Menu’ item. I have some evidence tending to support this. Consider this selector for the Calculator ‘View’ menu on the menubar, which was kludged together by first adding a MenuBar control and then editing it using the Custom Selector window:
(This of course has the associated screen image of its parent, the MenuBar, since it was created from it.) EDIT: “Should not ‘View’ be a ‘menu’, and not a ‘menuitem’?” WRONG: All UiAutomation “Spy” programs I’ve tested refer to the ‘View’ entry on the MenuBar as a ‘menuitem’. I stand corrected.
Using the selector created as above, the following code will click on the “View” menu, and you can see it flicker briefly.
System.RunApplication ApplicationPath: 'C:\Windows\System32\calc.exe' \
UIAutomation.Click Element: Calc4.Calc4.CalcWindow.MenuBarView \
In Notepad I’ve been able to interact with the expanded menu, via an analogous selector and modifier keys, but so far not here.