GetMenu()

Summary

Gets the contents of a menu in the currently active menu system.

Syntax

contents = GetMenu(string menu_name)

Argument Contents
menu_name The name of the menu whose contents are returned

Returns

An array containing the resource name of each menu item in the menu. Separators are represented by null.

Example

Menu "My Extra Menu"
MenuItem "My Extra 1" text: "Extra 1" ...
MenuItem "My Extra 2" text: "Extra 2" ...
EndMenu
Macro "Get"
m = GetMenu("My Extra Menu")
// m now contains {" My Extra 1", "My Extra 2"}
...
endMacro

Notes

  • The menu must be a submenu of the currently active menu system.

Error Codes

Error Type Meaning
NotFound The specified menu does not appear in the current menu system

See Also

Function Summary
AddMenuItem() Adds a menu item to a menu in the currently active menu system
RemoveMenuItem() Removes a menu item from the currently active menu system