User Guide

414
name (menu property)
Syntax
the name of menu(whichMenu)
the name of menu whichMenu
Description
Menu property; returns a string containing the name of the specified menu number.
This property can be tested but not set. Use the
installMenu command to set up a custom
menu bar.
Note: Menus are not available in Shockwave.
Examples
This statement assigns the name of menu number 1 to the variable firstMenu:
firstMenu = menu(1).name
The following handler returns a list of menu names, one per line:
on menuList
theList = []
repeat with i = 1 to the number of menus
theList[i] = the name of menu i
end repeat
return theList
end menuList
See also
number (menus), name (menu item property)
name (menu item property)
Syntax
the name of menuItem(whichItem) of menu(whichMenu)
the name of menuItem whichItem of menu whichMenu
Description
Menu property; determines the text that appears in the menu item specified by whichItem in the
menu specified by
whichMenu. The whichItem argument is either a menu item name or a menu
item number;
whichMenu is either a menu name or a menu number.
This property can be tested and set.
Note: Menus are not available in Shockwave.
Examples
This statement sets the variable itemName to the name of the eighth item in the Edit menu:
set itemName = the name of menuItem(8) of menu("Edit")
This statement causes a specific filename to follow the word Open in the File menu:
the name of menuItem("Open") of menu("fileMenu") = "Open" && fileName
See also
name (menu property), number (menu items)