processMenuCommand

                                       +-,-------+
                                       V         |
>>-processMenuCommand--(--+------+--,----submenu-+--,--menuItem--)-><
                          +-menu-+

Selects an item of the menu or submenu of the associated window. You can specify as many submenus as necessary to get to the required item.