home *** CD-ROM | disk | FTP | other *** search
- bat * Keyboard test routine.
- bat cls begtype
-
- ╒══════════════════════ KEYTEST ═════════════════════════╕
- │ │
- │ This program will give you complete details about │
- │ any key on the keyboard so that you can use a │
- │ special key combination within an Extended Batch │
- │ Language (EBL) program. You are only able to use │
- │ keys within EBL for which you see results. │
- │ │
- │ Refer to appendix E in your manual for a complete │
- │ listing of all keys available and their results. │
- │ │
- ╘════════════════════════════════════════════════════════╛
-
- PRESS ESC **TWICE** TO EXIT!
-
-
- end
- bat %0 = 0 |* ESC count reset.
- bat -top
- bat inkey Press the key to test> %a
- bat if %A = KEY01B %0 = %0 + 1 | if %0 > 1 exit |* EXIT if 2nd ESC key.
- bat if %A <> KEY01B %0 = 0 |* reset count if not.
- bat cls begtype
- ╒══════════════════════ KEYTEST ═════════════════════════╕
- ╘═════════════ (Press ESC twice to exit) ════════════════╛
-
- The key read from the INKEY command was: ;
- end
- bat type %A%S
- bat begtype
- ┌────────────────────────────────────────────────────────┐
- │ This is the value read FROM the keyboard INTO an │
- │ executing EBL program. You may test for this key │
- │ by including the following statements within your │
- │ program: │
- │ BAT INKEY Press the key to use> %A │
- │ BAT IF %A = ;
- end
- bat type %A%S;
- bat %1 = %A # |* get length of resulting value
- bat if %1 = 1 type %S%S%S%S%S; |* add space if short value
- bat begtype
- GOTO -doit │
- └────────────────────────────────────────────────────────┘
-
- The value to put into a BEGSTACK command is: ;
- end
- bat if %1 = 1 %3 = %A | goto -continue |* 1 length is simple ASCII
- bat %1 = %A $ 4 1 |* else get extended type ID
- bat %2 = %A $ 5 2 |* and get pseudo ASCII value
- bat if %1 = 0 %3 = \%2 |* make result type 0
- bat if %1 = 1 %3 = \00\%2 |* make result type 1
- bat -continue
- bat if %3 = \ %3 = \\ |* handle special case
- bat if %3 = ; %3 = ;%S |* handle special case
- bat type %3%S |* show result
- bat begtype
- ┌────────────────────────────────────────────────────────┐
- │ This is the value put INTO the keyboard (stack) FROM │
- │ the executing EBL program. To simulate this key, │
- │ include the following statements in your EBL program: │
- │ BAT BEGSTACK │
- │ ;
- end
- bat %1 = %3 # |* get length of result
- bat type %3;%S; |* show result & a semicolon
- bat -pad
- bat if %1 <> 8 | type %S; | %1 = %1 + 1 | goto -pad
- bat begtype
- │
- │ END │
- └────────────────────────────────────────────────────────┘
-
- end
- bat goto -top
-