HyperCard: Tips for Creating Menus (7/92)

During the creation or modification of menus, or when menus are addressed
from scripts, menu items must be referenced by exact name or number. To
avoid the error "No such menu item", remember these simple rules.

* "MenuItem" (single word) is the correct way to refer to a menu item in a
HyperTalk script.

* Menu items may be referred to by name or number. Names must be exact.
For example, in the standard HyperCard menus, menuItem 1 of menu "File"
is "New Stack..." . The three periods must be used in the name when
referring to this menuItem.

NOTE: Although all standard menu items with three dots use simple
periods, try an ellipsis (Option-semicolon) if your menuItem command fails.)

To refer to a menu item by number, count the first menu item as 1, and be
sure to count menu separators (--------------) as you would any other menu
item. (menuItem 4 of menu "File" is "-----------------")

* In the Style menu, the "9" (for point size) is actually " 9" --
that's TWO spaces in front of the nine. So to reference point size 9
from the Style menu, the script needs to do something like doMenu " 9".
If you omit the leading space ("9"), HyperCard will be unable to
identify the menu item.


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012