ONCOMMAND
Syntax ONCOMMAND id runlist
ONCOMMAND id []
 
Explanation ONCOMMAND defines a Logo run list which is executed whenever a menu command with the given ID number has been selected. Use the APPENDMENU and APPENDMENUITEM commands to define new menus and menu items; the, Logo procedures and run lists may be appended to those menu items with the help of this command.

ONCOMMAND can also be used to redefine the meaning of built-in Logo menu items. Use the ONCOMMAND command with the empty list as run list to remove any Logo commands defined with ONCOMMAND.

The FINDMENUID command may be used to find out the ID number of existing menu items.

See also DELETEMENU and DELETEMENUITEM.
 
 

Examples The following command causes Logo to print "No new windows!" when the user selects the "File/New Graphics Window" menu command:

ONCOMMAND 32766 [PRINT "|No new Windows!|]

TopIndex