Previous Next Chapter

Customizing ED

You can customize ED with commands that change the menus and function key setup. These commands can be entered individually within ED. They can also be saved as a script, such as S:Ed-startup, or as a file specified with the WITH argument. To execute the file from within ED, use the Run File (Esc,R,F) extended command. For information about changing the function keys, see page 12-14.

Set Menu Item

Esc,S,I

Defines the menu headings and items. There are 120 menu item slots ranging from 0 to 119. The slot type identifies the contents of the slot and is a number from 0 to 4. The 0 slot type must be the last defined slot. Do not create a menu without items; if you specify a menu heading, include menu items after it. See page 12-20 for the syntax of the Set Menu Item command and a table of the slot types.

Enable Menu

Esc,E,M

Enables menus. You must follow the Set Menu Item commands with EM to enable the menu commands. See page 12-21 for an example script using the Enable Menu command.

Set Menu Item

The following is the syntax for the Set Menu Item command:

SI <slot number> <slot type> /string1/string2/

The following table shows the slot types and functions used with the Set Menu Item command:

Type

Function

String Input

0

End of Menus

No arguments

1

Menu Heading

String1 = heading name

2

Menu Item

String1 = item name

String2 = command string

3

Submenu Heading

String1 = heading name

String2 = command string

4

Separator bar

No arguments

Example Script

The following is an example script using the Set Menu Item and Enable Menu commands. Quotation marks are used as the delimiters.

SI 0 1 "Project"
SI 1 2 "Open ..." "op ? /Open file:/"
SI 2 2 "Save ..." "sa"
SI 3 4
SI 4 2 "Quit!" "q"
SI 5 1 "Move"
SI 6 2 "Top" "t"
SI 7 2 "Bottom" "b"
SI 8 0
EM

Top Previous Next Chapter