Event number: 6
Generated for: Window, Form, Dialog, Document
The currently-active window receives a Menu event if the user selects a menu from the main menu bar. This can be used as alternative way of detecting menu clicks, instead of using the menu item's onClick callback. The event-specific parameters in ŒEV are (in index origin 1):
ŒEV[6] Menu number in the menu bar ŒEV[7] Item number within the menu
Menu and item numbers start at 1, and are in the sequence in which they appear (the same as the order property of the Menu object). Invisible menu items, and separators, are counted in the sequence. If you have a sub-menu, the item number is multiplied by 100 for each level down the hierarchy.
For example, if you have a File menu as the first menu in the menu bar, and it has two items Open and Save, the Open menu will be reported as Menu 1 Item 1, and the Save item as Menu 1 Item 2. If the Save menu has a sub-menu with items Final and Draft, these will be reported as Menu 1 Item 201 and Menu 1 Item 202 respectively.