The MENU keyword simply means start another menu and the BUTTON keyword tells the system that a button within the current menu is being defined. e.g. the following
;Image proc menu
MENU
;
BUTTON SLICE ISLICE
BUTTON STATS ICENTROID|IMODE KEY|ICIRCLE RAD=0.1|ISTATS|IMODE CUR
BUTTON RADIAL IRADIAL
BUTTON EXTRAS USEMENU 2
BUTTON QUIT QUIT
;
; Second menu of additional options
MENU
;
BUTTON "SET DEF" DEFAULT /scratch/rds
BUTTON SPOKES XSPOKES
BUTTON QUIT USEMENU 1
The above is a simple two menu file which defines a number of image
processing operations in the first menu and some extra functions in a
second menu. The second menu may be called from the first by pressing
the "EXTRAS" button.Note the use of the pipe character (|) in the STATS command to allow several operations to be performed sequentially. The QUIT button in the first menu, has been set up to issue the QUIT command. This is a special command which is recognised by the RUNMENU procedure as a means of exiting the menu system. A top level menu should include one button which executes this command so that a neat exit from the menu system can be achieved (otherwise CNTL C works).
The format for the BUTTON command is 'BUTTON name command'. If a button name is required with an embedded space then the name should be enclosed in quotes, e.g. the 'SET DEF' command.
A menu file may be loaded with the LOADMENU command. It is then executed by typing "RUNMENU 1".
Example menus exist in the $AST_DAT_MENU directory.