set the menuItems of [menu
<submenu_name> of] menu <menu_name> to <list>
Applies to menus
The menuItems property determines the items in a user-defined menu or submenu. The menuItems property is a list of item names separated by carriage returns. The default value is an empty character string. Each item can contain up to 31 characters.
The following list summarizes the special characters that can be used when adding a menu item:
Meaning: Item created disabled Example: "(Next"
Meaning: Accelerator key to follow Example: "Delete/D"
Meaning: Character key equivalent to follow (MS-Windows only) Example: "&Previous" or "Pr&evious"
Meaning: Multiple items created Example: "First;Last;Recent"
You cannot retrieve the items in a menu or submenu using the menuItems property.
You can add duplicate entries to a menu, but only the first entry can be affected by other scripting commands such as enable and disable.
Place the following handler in the script of a stack.
create menu "Presidents"
put "Washington" into the_items
put return&"Lincoln/L" after the_items
put return&"&Kennedy" after the_items
put return&"(Nixon" after the_items
put return&"Clinton" after the_items
set the menuItems of menu "Presidents" to the_items
Close the stack and then reopen it. You should see a new menu, "Presidents", with the following menu items: "Washington", "Lincoln" (with accelerator key "L"), "Kennedy" (with character equivalent "K"), "Nixon" (disabled), and "Clinton".
This text has been mechanically extracted from the Oracle Media Objects 126.96.36.199 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.