If more than a single bit is set in this pattern, several keys must be pressed at the same time in order to call up the associated menu item. Any of these keyboard shortcuts can be erased by using MENU KEY with no parameters. For example:
X> Menu Key(1,10) : Rem Erase shortcut assigned to item (1,10)
Here is an example that checks for key presses of the Amiga's ten function keys:
E> Menu$(1)="Function Keys" For A=1 To 10 OPT$="F"+Str$(A)+" " Menu$(1,A)=OPT$ Menu Key(1,A) To 79+A Next A Menu On Do If Choice Then Print "You have pressed Function Key ";Choice(2) Loop
Embedded menu commands
AMOS Professional menus offer complete freedom to make use of any text styles of graphics
you want. The final part of this Chapter deals with the commands that make this possible.
Any menu string can include a powerful set of optional embedded commands that allow you to customise the appearance of your menus. These embedded commands must be enclosed between sets of brackets, and individual commands must be separated by colons, like this:
X> Menu$(1)"(LOcate 10,10: Ink 1,1)I am embedded"
Each embedded command consists of only two characters, which can be in either upper or lower case. Any other characters will be ignored. So the following characters will be treated as "LO" when entered as an embedded command:
X> LO lo locate Lonniedonegan
Most embedded commands also require you to input one or more numbers. These numbers must never make use of expressions, because they will not be evaluated.
In the listings for all of the following embedded commands, the two important characters that make up the command are in upper case bold type.
LOCATE
embedded command: move the graphics cursor
LOcate x,y