MENU MAKER USER'S MANUAL 10/10/1988 TRUEDOX Technology Corporation Content Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 Menu language statements . . . . . . . . . . . . . . . . . . 5 Commands . . . . . . . . . . . . . . . . . . . . . . . 5 Statement Format . . . . . . . . . . . . . . . . . . . 6 Command Description . . . . . . . . . . . . . . . . . . 8 BEGIN . . . . . . . . . . . . . . . . . . . . . . 8 ASSIGN . . . . . . . . . . . . . . . . . . . . . . 9 EXECUTE . . . . . . . . . . . . . . . . . . . . . 10 MATCH . . . . . . . . . . . . . . . . . . . . . . 10 MENU . . . . . . . . . . . . . . . . . . . . . . . 11 POPUP . . . . . . . . . . . . . . . . . . . . . . 13 TYPE . . . . . . . . . . . . . . . . . . . . . . . 16 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . 19 TYPE.DEF . . . . . . . . . . . . . . . . . . . . . . . 19 BEGIN.DEF . . . . . . . . . . . . . . . . . . . . . . . 19 MATCH.DEF . . . . . . . . . . . . . . . . . . . . . . . 20 MENU.DEF . . . . . . . . . . . . . . . . . . . . . . . 22 I. Introduction TRUEDOX Menu Maker is designed for you to make your own Popup menu for non-mouse based applications. To create your own Popup menu, you must proceed the following steps: Step 1: Use Word processor or Editor which is compatible with DOC text file format (e.g. PE2, Professional Editor, WordStar, Word Perfect...) to create a menu source file, with an extension name of .DEF. Ex: File name: 123.DEF File name: DBASE.DEF Step 2: Use Menu Maker compiler file: MAKEMNU.EXE to compile your source file. [SYNTAX]: makemnu filename ENTER Ex: Makemnu 123 (ENTER) Makemnu DBASE (ENTER) Step 3: If there is no errors, your Popup menu is compiled and ready for use, the file automatically uses an extension name of .MNU. If errors happened, refer to the error message of chapter 4 to correct your source file, then repeat step 2. Ex: File name after compiler: 123.mnu File name after compiler: DBASE.mnu Step 4: Use menu maker execution file:MENU.EXE to execute your Popup menu. [SYNTAX]: menu filename ENTER Ex: Menu 123 (ENTER) Menu DBASE (ENTER) Step5: If you want to disable popup funtion, just type "menu off". Typing "menu on" enable popup function again. The menu source file can be developed easily by referring to the Menu language statement in Chapter II. However, it is suggested that user to read Chapter III for a brief tutorial(*) before go to Chapter II in details. * The source files(*.DEF) of the tutorial are included in the diskette. II. Menu language statements A. Commands TRUEDOX Menu Maker supports 13 commands, which assign different functions to generate Pop-up Menu to work with the mouse. They are described as follow: BEGIN: Defines function of mouse buttons, moving direction and speed sensitivity at the start of menu source file. This command is essential to start the source file. ASSIGN: Assigns new behavior to mouse actions which have been previously defined in the BEGIN statement. EXECUTE: Specifies a sequence of statements to be executed. MATCH: Specifies the action taken when a unique string of characters is displayed at a specified location on the screen. MENU: Begins a Menu subroutine. OPTION: Defines an item in a Menu subroutine and the action taken when the item is selected. MEND: Ends a Menu subroutine. POPUP: Begins a multi-column menu subroutine. TEXT: Defines the text for a Popup menu title or menu items. SELECT: Defines an item for the action taken when the item is selected in a Popup menu. PEND: Ends a Popup subroutine. TYPE: Sends characters and commands as if type from keyboard. NOTHING: Indicates that no action is taken. An alternative to the EXECUTE, TYPE, and MATCH statements. B. Statement Format Statement consists of 4 elements: Label, Command, Parameter and comments. The statement format is [label:] command parameters [;comments] ** Note: The elements in bracket "[ ]" are optional elements, which can be with or without in a statement. Label: A label is the name you assign to a statement, which allows the program to execute statements in a different order as they appear in source file. * Label must be followed by a colon(:) * At least one space between the colon and command. * Do not use command names or reserved words... BACKSPACE ENTER, ESC, TAB for labels. Parameters: Menu programming language uses three types of parameters: numeric parameters. string parameters. attribute parameters. * Numeric parameters: used for numeric data, such as screen coordinates or movement-sensitivity values for the mouse. * String parameters: string parameters specify text for menus or messages. * Display attribute parameters: A display attribute parameter specifies what color a menu or message box appears on the screen. Display attribute = Foreground colors + Background colors. Color Foreground Background Black 0 0 Blue 1 16 Green 2 32 Cyan (blue-green) 3 48 Red 4 64 Magenta 5 80 Brown 6 96 White 7 112 Gray 8 128 Light Blue 9 144 Light Green 10 160 Light Cyan 11 176 Light Red 12 192 Light Magenta 13 208 Yellow 14 224 White (high intensity) 15 240 Comments: Comments describe what a statement does, which have no effect when the statement is executed. There are five types of statements in the menu language: 1. Event statements: BEGIN, ASSIGN Define what action is taken when a mouse event occurs. 2. Menu statements: MENU, OPTION, MEND Create single-column menus. 3. Popup statements: POPUP, TEXT, SELECT, PEND Create multiple-column menus and message boxes. 4. Action statements: EXECUTE, TYPE, NOTHING Perform an action as a result of a mouse event, menu subroutine, or string match statement. 5. String match statement: MATCH Executes other statements depending on what is displayed on the screen. C. Command Description 1. BEGIN [SYNTAX] BEGIN [lfbtn], [rtbtn], [mdbtn], [lfmov], [rtmov], [upmov], [dnmov], [hsen], [vsen] Begin statement specifies 9 parameters(these parameters to be defined strictly in accordance with above sequence). Each parameter defines a statement to be executed when the user clicks a mouse button or moves the mouse. There are three types of parameters in the BEGIN statement: Button parameters: lfbtn Left button clicking rtbtn Right button clicking mdbtn Middle button clicking Define the action taken when one of mouse buttons are clicked. Movement parameters: lfmov Move leftword rtmov Move rightword upmov Move upword dnmov Move downward Define the action taken when the mouse is moved. Movement sensitivity parameters: hsen Horizontal movement sensitivity vsen vertical movement sensitivity Example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ BEGIN ent, esc,, lf, rt, up, dn ³ ³ ³ ³ lf: TYPE 0,75 ;simulate the left cursor key ³ ³ rt: TYPE 0,77 ;simulate the right cursor key ³ ³ up: TYPE 0,72 ;simulate the up cursor key ³ ³ dn: TYPE 0,80 ;simulate the down cursor key ³ ³ esc:TYPE ESC ;simulate the Esc key ³ ³ ent:TYPE ENTER ;simulate the enter key ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ent: Define left button statement. esc: Define right button statement. lf: Define move leftword statement. rt: Define move rightword statement. up: Define move upward statement. dn: Define move downward statement. The BEGIN statement in this example gives initial values for all parameters except "mdbtn", "hsen", and "vsen". Because "mdbtn" isn't specified, nothing happens when the user clicks middle button. Because no values are given for "hsen" and "vsen", the default values are used (8 and 16 mickeys, respectively) 2. ASSIGN [SYNTAX] label: ASSIGN [lfbtn], [rtbtn], [mdbtn], [lfmov], [rtmov], [upmov], [dnmov], [hsen], [vsen] Assign statement used to redefine one or more parameters given in the Begin statement or most recent Assign statement. If a parameter value isn't specified in an ASSIGN statement then this particular parameter value will remain the same as BEGIN statement or last ASSIGN statement. All parameters are defined in same format as Begin statement. All assign statements must be captioned with a label. Example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ BEGIN esc, ent, mml, lf, rt, up, dn ³ ³ . ³ ³ . ³ ³ . ³ ³ reassign: ASSIGN y, not,,,, not, not 16, 18 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ In this example, the BEGIN statement assigns the initial values of all button and movement parameters. Because no values are specified for the sensitivity parameters ("vsen" and "hsen"), the default values are used. The ASSIGN statement changes the values of the left button, right button, and up and down movement parameters. It also changes the value of "hsen" to 16 and the value of "vsen" to 18. Commas are used for the parameters whose values aren't changed. 3. EXECUTE [SYNTAX] ELabel: EXECUTE label [,label....] Execute command is used to define other statements to be executed. Statements within an EXECUTE statement are executed sequentially starting with the first statement. Parameters Elabel Name of the EXECUTE statement. All EXECUTE statements must be labeled. label Name of the statement to be executed. Example: exec: EXECUTE dir, s, c, ent ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³dir: TYPE "dir" ³ ³S : TYPE 32 ; Space Code ³ ³C : TYPE "c:" ³ ³ent: TYPE enter ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The EXECUTE statement labeled "exec" executes the statements labeled "dir", "s", "c", nd "ent". These statements simulate typing dir C: and pressing ENTER. 4. MATCH [SYNTAX] label: MATCH row, column, attribute, string, mlabel, nlabel MATCH command is used to define a specified string in a given screen location. If it is found then execute the match statement, else execute the nomatch statement. Row, column are used to describe the absolute screen coordinates. The starting coordinates for the screen are in the upper-left corner of screen (row=1, column=1). Parameters label Name of the MATCH statement. All MATCH statements must be labeled. row,column Used to specify the string coordinates on the screen. attribute Used to specify the attribute of string. This can be one of the symbolic values "normal", "bold", or "inverse", or a decimal value that denotes specific foreground and background colors.(refer to attribute parameters value) string This can be any string of up to 80 ASCII characters enclosed in double quotation marks (" "). mlabel if the string is matched, this label specifies statement will be executed. nlabel if the string is not matched, this label specifies statement will be executed. Example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³BEGIN leftb ³ ³ ³ ³leftb: MATCH 5, 40, normal, "test", find, not-find ³ ³find: TYPE "string match" ³ ³not-find: TYPE "string not match" ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ When user clicks the left mouse button, if there is a string "test", which on the screen at locate row=5, column=40, and attribute=normal, then will print out a message " string match", else print out "string not match". 5. MENU [SYNTAX] label: MENU "title", row, column, attribute OPTION "text", pointer . . . MEND MENU statement used to create single-column Popup menus. When this statement is active, there will be a single-column menu display on the screen, The user chooses items in the menu by moving mouse cursor to the desired item. then clicking left mouse button at once, the equivalent statement specified by pointer of OPTION statement will be executed. OPTION statement is used to define each menu item in the MENU statement. Parameter label Name of the Menu subroutine. All Menu subroutines must be labeled. title Text of the menu title, enclosed in double quotation marks (" "). row,column Used to specify the top-left corner of the menu appears. attribute Used to specify the attribute of menu displayed on the screen. text Legend text for the menu item. The legend text must be enclosed in double quotation marks (" "). pointer Label of the statement will be executed when user chooses the menu item. Example: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³mlabel: MENU "Display Directory", 5, 5, inverse ³ ³ OPTION " *.EXE ", Ex.1 ³ ³ OPTION " *.C ", Ex.2 ³ ³ OPTION " *.COM ", Ex.3 ³ ³ MEND ³ ³Ex.1 : TYPE "dir *.exe", enter ³ ³Ex.2 : TYPE "dir *.c", enter ³ ³Ex.3 : TYPE "dir *.com", enter ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ (Screen coordinate) ³ ÀÄÄÄÄ> ÚÄDisplay DirectoryÄ¿ (5,5) ³ *.EXE ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ *.C ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ *.COM ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ This menu title is "Display Directory". The Top-left corner of the menu is in row 5, column 5, and an inverse screen attribute. The OPTION statements specify which statements are executed when the user chooses items from the menu. 6. POPUP [SYNTAX] label: POPUP row, column, attribute TEXT "string" . . SELECT srow, scolumn, width, pointer . . . PEND Popup statement is used to define multiple-column menu which are used in the same way as menu statement. Select command is used to define the selection area of items on the menu, and the statement which will be executed when the item is selected. Text command is used to define the menu title and the legend text for menu items. Parameter label Name of the Popup subroutine. All Popup statements must be labeled. row,column Used to specify the top-left corner of menu on the screen (the top left corner on the screen is row 1, column 1). attribute A value that specifies how the menu is displayed on the screen. This can be "normal", "bold", or "inverse", or a decimal value that specifies particular foreground and background colors. string Defines the Popup menu title or the legend text of a menu item. All text must be enclosed in double quotation marks (" "). You can use ASCII code to construct lines and boxes. All string defined by text statement must be equal length. ASCII code Graphic code = ÍÍ - ÄÄ 1 À ; Ô 2 Á ; Ï 3 Ù ; ¾ 4 à ; Æ 5 Å ; Ø 6 ´ ; µ 7 Ú ; Õ 8  ; Ñ 9 ¿ ; ¸ number keys 1 - 9 position mapping to your keypad. ÉÍ» ÉÍ» ÉÍ» Ú Â ¿ º7º º8º º9º Èͼ Èͼ Èͼ ÉÍ» ÉÍ» ÉÍ» º4º º5º º6º <==> à Š´ Èͼ Èͼ Èͼ ÉÍ» ÉÍ» ÉÍ» º1º º2º º3º Èͼ Èͼ Èͼ À Á Ù Ex: 7 = = = 8 = = = 9 ÕÍÍÍÍÍÍÍÑÍÍÍÍÍÍ͸ | | | ³ ³ ³ | | | ³ ³ ³ 4 = = = 5 = = = 6 ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍ͵ | | | ³ ³ ³ | | | ³ ³ ³ 4 = = = 5 = = = 6 ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍ͵ | | | ³ ³ ³ | | | ³ ³ ³ 1 = = = 2 = = = 3 ÔÍÍÍÍÍÍÍÏÍÍÍÍÍÍ; Srow defines the vertical starting point of item, selection area. Which is relative to the row coordinates specified in this Popup statements. Minimum value is 1. Scolumn defines the horizontal starting point of item selection area. Which is relative to the column coordinates specified in this Popup statements. Minimum value is 1. Width defines the width of item selection area. Pointer label of the statement to be executed, when the item selection area is chosen in the menu. Ex: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ plabel: Popup 3, 5, normal ³ ³ text " 7======== popup ============= 9 " ³ ³ text " DIR: List current directory | " ³ ³ text " CLS: Clear screen | " ³ ³ text " TIME: Display current time | " ³ ³ text " DATE: Display current date | " ³ ³ text " 7-----------------------------6 " ³ ³ text " | DIR TIME | " ³ ³ text " | CLS DATE | " ³ ³ text " 1=============================3 " ³ ³ Select 7, 3, 3, dir ³ ³ Slecect 7,19, 4, time ³ ³ Select 8, 3, 3, cls ³ ³ Select 8,19, 4, date ³ ³ PEND ³ ³ ³ ³ dir : TYPE "dir", enter ³ ³ cls : TYPE "cls", enter ³ ³ time: TYPE "time", enter, enter ³ ³ date: TYPE "date",enter, enter ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Screen coordinate (3,5) ³ ³ ÀÄÄÄÄÄÄÄÄÄ> ÕÍÍÍÍÍÍÍÍ popup ÍÍÍÍÍÍÍÍÍÍÍÍÍ͸ ³ ³ DIR: List current directory ³ CLS: Clear screen ³ TIME: Display current time ³ DATE: Display current date ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij ³ DIR TIME ³ ³ CLS DATE ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 7. TYPE [SYNTAX] label : TYPE key [, key ...] TYPE statement simulates typing keystrokes. All keys specified in the TYPE statement are inserted into a keyboard buffer when the menu program is running and are not output as keystrokes until the menu program becomes inactive. Parameter label Name of the TYPE statement. All TYPE statements must be labeled. key Name of the key. It can be: * A single letter or number enclosed in double quotation marks (" "); or a sequence of keystrokes enclosed in double quotation marks (such as "dir") * A standard ASCII code (characters 0 through 127), or an extended ASCII code (characters 128 through 255) * An extended keyboard scan code * Any of the following predefined symbolic keys: "enter", "tab", "backsp", "esc". ASCII Control Character ASCII Key ASCII Key code equivalent code equivalent 0 none 16 CONTROL-P 1 CONTROL-A 17 CONTROL-Q 2 CONTROL-B 18 CONTROL-R 3 CONTROL-C 19 CONTROL-S 4 CONTROL-D 20 CONTROL-T 5 CONTROL-E 21 CONTROL-U 6 CONTROL-F 22 CONTROL-V 7 CONTROL-G 23 CONTROL-W 8 backspace 24 CONTROL-X 9 horizontal tab 25 CONTROL-Y 10 line feed 26 CONTROL-Z 11 CONTROL-K 27 ESCAPE 12 CONTROL-L 28 CONTROL- 13 carriage return 29 CONTROL-] 14 CONTROL-N 30 CONTROL-^ 15 CONTROL-O 31 CONTROL-_ Extended Keyboard Scan Codes Keystroke(s) Scan code HOME 0, 71 CONTROL-HOME 0, 119 up arrow key 0, 72 down arrow key 0, 80 left arrow key 0, 75 CONTROL-left arrow key 0, 115 right arrow key 0, 77 CONTROL-right arrow key 0, 116 END 0, 79 CONTROL-END 0, 117 PAGEUP 0, 73 CONTROL-PAGEUP 0, 132 PAGEDOWN 0, 81 CONTROL-PAGEDOWN 0, 118 CONTROL-PRINTSCREEN 0, 114 INSERT 0, 82 DELETE 0, 83 SHIFT-TAB 0, 15 Keystroke(s) Scan code Keystroke(s) Scan code F1 0,59 ALT-0 0,129 F2 0,60 ALT-1 0,120 F3 0,61 ALT-2 0,121 F4 0,62 ALT-3 0,122 F5 0,63 ALT-4 0,123 F6 0,64 ALT-5 0,124 F7 0,65 ALT-6 0,125 F8 0,66 ALT-7 0,126 F9 0,67 ALT-8 0,127 F10 0,68 ALT-9 0,128 SHIFT-F1 0,84 ALT-- 0,130 SHIFT-F2 0,85 ALT-= 0,131 SHIFT-F3 0,86 ALT-A 0, 30 SHIFT-F4 0,87 ALT-B 0, 48 SHIFT-F5 0,88 ALT-C 0, 46 SHIFT-F6 0,89 ALT-D 0, 32 SHIFT-F7 0,90 ALT-E 0, 18 SHIFT-F8 0,91 ALT-F 0, 33 SHIFT-F9 0,92 ALT-G 0, 34 SHIFT-F10 0,93 ALT-H 0, 35 Keystroke(s) Scan code Keystroke(s) Scan code CONTROL-F1 0, 94 ALT-I 0,23 CONTROL-F2 0, 95 ALT-J 0,36 CONTROL-F3 0, 96 ALT-K 0,37 CONTROL-F4 0, 97 ALT-L 0,38 CONTROL-F5 0, 98 ALT-M 0,50 CONTROL-F6 0, 99 ALT-N 0,49 CONTROL-F7 0,100 ALT-O 0,24 CONTROL-F8 0,101 ALT-P 0,25 CONTROL-F9 0,102 ALT-Q 0,16 CONTROL-F10 0,103 ALT-R 0,19 ALT-F1 0,104 ALT-S 0,31 ALT-F2 0,105 ALT-T 0,20 ALT-F3 0,106 ALT-U 0,22 ALT-F4 0,107 ALT-V 0,47 ALT-F5 0,108 ALT-W 0,17 ALT-F6 0,109 ALT-X 0,45 ALT-F7 0,110 ALT-Y 0,21 ALT-F8 0,111 ALT-Z 0,44 ALT-F9 0,112 ALT-F10 0,113 III. Tutorial 1. TYPE.DEF Step 1: Open a file named TYPE.DEF Step 2: Using BEGIN command define 3 label of statements Lfbtn, Rtbtn, Mdbtn. BEGIN Lfbtn, Rtbtn, Mdbtn Step 3: Define label : Lfbtn (Left button) Lfbtn: TYPE "dir", enter This statement will send the word dir and press ENTER key once. This will cause DOS to display directory. Step 4: Define label : Rtbtn (Right button) Rtbtn: TYPE "ver", enter This statement will send the word ver and press ENTER key once. This will cause DOS to display DOS version. Step 5: Define label : Mdbtn (middle button) Mdbtn: TYPE "date", enter, enter This statement will send the word date and press ENTER key twice. This will cause DOS to display the time. 2. BEGIN.DEF Step 1: Open a file named BEGIN.DEF Step 2: Define BEGIN statement BEGIN lftbtn, rtbtn, mdbtn, lfmov, rtmov, upmov, dnmov, 50, 100 Step 3: Define label: lfbtn (left button) lfbtn: TYPE "left button",3 This statement will send string 'left button' and CRTL-C to keyboard buffer. Step 4: Define label: rtbtn (right button) rtbtn: TYPE "right button",3 This statement will send string 'right button' and CTRL-C to keyboard buffer. Step5: Define label: mdbtn (middle button) mdbtn: TYPE "middle button",3 This statement will send string 'middle button' and CTRL-C to keyboard buffer. Step6: define label: lfmov lfmov: TYPE 0,75 Step7: define label: rtmov rtmov: TYPE 0,77 Step8: Define label: upmov upmov: TYPE 0,72 Step9: Define label: dnmov dnmov: TYPE 10,80 3. MATCH.DEF Step1: Open file match.def Step2: define BEGIN statement begin tmatch Define left button statement with label name: tmatch Stpe3: Define label: tmatch tmatch: match 4,1,normal,"ABCD",success,fail This statement command is MATCH. If there is a string 'ABCD' with normal attribute at the screen row 4, column 1, then statement SUCCESS will be executed else statement FAIL will be executed. Step4: Define label: success success: popup 4,10,bold text "<-- string: ABCD appears on this line --9" text " |" text "7---------------------------------------6" text "| CLEAR SCREEN |" text "1---------------------------------------3" select 4,3,12,cls pend This statement command is POPUP,which specifies the popup menu will appear at screen position row 4, column 10, and with bold attribute. There are 5 TEXT statements define popup menu contents. SELECT statement defines the select area at row 4, column 3, width 12 from the popup menu top- left corner (string 'CLEAR SCREEN' position). When this area is selected label: cls statement will be executed. PEND end the popup command. Step5: Define label: fail fail: popup 4,10,normal text "<-- string: ABCD doesn't appear on this line -- 9" text " |" text "7-----------------------------------------------6" text "| GET ABCD TO APPEAR |" text "1-----------------------------------------------3" select 4,3,18,gets pend Label fail defines a popup menu at screen row 4, column 10, normal attribute. There are five TEXT statements define contents of popup menu. SELECT statement specifies the selection area at row 4, column 3, width 18 from the top-left corner of the popup menu.(string 'GET ABCD TO APPEAR'). When this area is selected label: gets statement will be executed. Step6: Define label: gets gets: type "cls",enter,"echo ABCD",enter label gets: defines a TYPE statement, which will send DOS command - cls to keyboard buffer to clear screen, then echo string 'ABCD' at row 4, column 1 at screen. Step7: Define label: cls cls: type "cls",enter label cls: defines a TYPE statement to clear screen. 4. MENU.DEF Step1: Open file MENU.DEF Step2: Define BEGIN statement begin menu1 Begin statement define a label menu1 (left button ). Step3: Define label: menu1 menu1: menu "Menu Title String",4,40,normal option "Time - Current time",time option "Check Disk",chkdsk option "Dir - List Directory",dr mend label menu1 defines MENU statement, which with a title string 'Menu Title String', at row 4, column 40, normal attribute on the screen. This menu command has three OPTION statement. 1. option "Time - Current time",time This OPTION statement defines first column content of menu, string 'Time - Current time'. When this column is selected label: time will be executed. 2. option "Check Disk",chkdsk This OPTION statement defines second column content of menu, string 'Check Disk'. When this column is selected label: chkdsk will be executed. 3. option "Dir - List Directory",dr This OPTION statement defines third column content of menu, string 'Dir - List Directory'. When this column is selected label: dr will be executed. Step5: Define label: chkdsk chkdsk: type "chkdsk", enter label: chkdsk defines TYPE statement. This statement will send word 'chkdsk' to keyboard buffer. Step6: Define label: dr dr: type "dir",enter label: dr defines TYPE statements. This statement will send word 'dir' to keyboard buffer. IV. Error Message Command: (ASSIGN) defined label not found Label defines in ASSIGN statement, which is not defined in source file. Command: (ASSIGN) parameter define too much ASSIGN statement maximun can define 9 parameters. Command: (BEGIN) not found The source file doesn't define BEGIN statement. Command: (BEGIN) define label not found Label defines in BEGIN statement, which is not defined in source file. Command: (BEGIN) define parameter too much BEGIN statement maximun can define 9 parameters. Command: (EXECUTE) define label = xxxx not found Label defined in EXECUTE statement, which was not define in the source file Command: (MENU) parameter error MENU statement must define 3 parameters: ROW, COLUMN, ATTRIBUTE. Command: (MENU) attribute value error Attribute value: 0 < attribute value < 255. Command: (MENU) Must include at least one OPTION statement MENU subroutine must include at least one OPTION statement. Command: (MENU) define label = xxx not found Label defines in the OPTION statement, which isn't found in source file. Command: (OPTION) didn't define label OPTION statement must defines a label. Command: (MATCH) parameter error MATCH statement must define 6 parameters. Which are 'ROW', 'COLUMN', 'ATTRIBUTE', 'STRING', 'MATCH' , 'NOMATCH'. MACTCH and NOMATCH are label. Command: (MATCH) define label not found Label defines in the MACTH statement isn't defined in the source file. Command: (POPUP) parameter error In the POPUP statement must define 3 parameter, which are 'ROW', 'COLUMN', 'ATTRIBUTE'. Command: (POPUP) must include at least one SELECT statement In the POPUP subroutine must include at least one SELECT statement. Command: (TEXT) string length non equal All string defined by TEXT statement in the POPUP subroutine must be equal length. Command: (SELECT) didn't define label All SELECT must define label.