MenuItem
Wrap a menu item
The MenuItem class is accessible via the pywinauto.controls.menuwrapper module.
Methods
f __init__(self, ctrl, menu, index, on_main_menu=False) ...
Initalize the menu item
- ctrl The dialog or control that owns this menu
- menu The menu that this item is on
- index The Index of this menuitem on the menu
- on_main_menu True if the item is on the main menu
f Type(self) ...
Return the Type of this menu item
Main types are MF_STRING, MF_BITMAP, MF_SEPARATOR.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/menus/menureference/menustructures/menuiteminfo.asp for further information.
f Click(self) ...
Click on the menu item
If the menu is open this it will click with the mouse on the item. If the menu is not open each of it's parent's will be opened until the item is visible.
f Select(self) ...
Select the menu item
This will send a message to the parent window that the item was picked
f GetProperties(self) ...
Return the properties for the item as a dict
If this item opens a sub menu then call Menu.GetProperties() to return the list of items in the sub menu. This is avialable under teh 'MenuItems' key
See the source for more information.