home *** CD-ROM | disk | FTP | other *** search
- bios
- ECHO OFF
- break on
- rem saving starting drive/directory to return to as needed.
- GETDRIVE %!d
- GETDIR %!p
- rem This is not used in this menu. However, if it was:
- rem %!d:
- rem cd\%!p
- rem would be used each time upon changing drives & directories.
- Let %!z = L1
- :TOP2
- rem This is used only when menu has been overwrittened by some other
- rem program or full screen write.
- cls
- GOSUB MENU
- :TOP
- rem calling the MAKECOM.BAS created screen .COM file.
- GOSUB SCREEN
- rem ==============================
- rem display a clock on screen
- HOUR_HOUR
- ERROR_LEVEL %!h
- let %!w = %!h
- lt %!w 10
- if errorlevel 1 let %!h = 0%!h
- MINUTE_MINUTE
- ERROR_LEVEL %!m
- let %!w = %!m
- lt %!w 10
- if errorlevel 1 let %!m = 0%!m
- rem the below feature does not give an accurate reading. 'Tis best
- rem to not even use it unless attempting a timing algorythm.
- REM SECONDS_SECONDS
- REM ERROR_LEVEL %!s
- rem locate 2 20
- rem echonolf ▐ %!h:%!m:%!s ▌
- rem *litebar screen writes
- locate 2 21
- echonolf ▐ %!h:%!m ▌
- rem ==============================
- rem Get the key press then evaluate it.
- rem Note the sequence of using the same ERRLEVEL test two or three times
- rem with its associated action command. For two tests, it means HOME,
- rem END, or F1-F9 was pressed. For three tests, either an uppercase
- rem or lower case letter was pressed. The third test branches to the
- rem chosen menu choice's batch commands.
- getkey
- IF ERRLEVEL 20224 Let %!z = L9
- IF ERRLEVEL 20224 GOTO TOP
- IF ERRLEVEL 19712 GOTO RTL1
- IF ERRLEVEL 19200 GOTO LTL1
- IF ERRLEVEL 18176 Let %!z = L1
- IF ERRLEVEL 18176 GOTO TOP
- IF ERRLEVEL 17408 Let %!z = L1
- IF ERRLEVEL 17408 GOTO TOP
- IF ERRLEVEL 17152 Let %!z = L9
- IF ERRLEVEL 17152 GOTO TOP
- IF ERRLEVEL 16896 Let %!z = L8
- IF ERRLEVEL 16896 GOTO TOP
- IF ERRLEVEL 16640 Let %!z = L7
- IF ERRLEVEL 16640 GOTO TOP
- IF ERRLEVEL 16384 Let %!z = L6
- IF ERRLEVEL 16384 GOTO TOP
- IF ERRLEVEL 16128 Let %!z = L5
- IF ERRLEVEL 16128 GOTO TOP
- IF ERRLEVEL 15872 Let %!z = L4
- IF ERRLEVEL 15872 GOTO TOP
- IF ERRLEVEL 15616 Let %!z = L3
- IF ERRLEVEL 15616 GOTO TOP
- IF ERRLEVEL 15360 Let %!z = L2
- IF ERRLEVEL 15360 GOTO TOP
- IF ERRLEVEL 15104 Let %!z = L1
- IF ERRLEVEL 15104 GOTO TOP
- IF ERRLEVEL 119 Let %!z = L3
- IF ERRLEVEL 119 GOSUB SCREEN
- IF ERRLEVEL 119 GOTO L3
- IF ERRLEVEL 118 Let %!z = L6
- IF ERRLEVEL 118 GOSUB SCREEN
- IF ERRLEVEL 118 GOTO L6
- IF ERRLEVEL 117 Let %!z = L2
- IF ERRLEVEL 117 GOSUB SCREEN
- IF ERRLEVEL 117 GOTO L2
- IF ERRLEVEL 114 Let %!z = L9
- IF ERRLEVEL 114 GOSUB SCREEN
- IF ERRLEVEL 114 GOTO L9
- IF ERRLEVEL 105 Let %!z = L8
- IF ERRLEVEL 105 GOSUB SCREEN
- IF ERRLEVEL 105 GOTO L8
- IF ERRLEVEL 102 Let %!z = L7
- IF ERRLEVEL 102 GOSUB SCREEN
- IF ERRLEVEL 102 GOTO L7
- IF ERRLEVEL 100 Let %!z = L5
- IF ERRLEVEL 100 GOSUB SCREEN
- IF ERRLEVEL 100 GOTO L5
- IF ERRLEVEL 99 Let %!z = L4
- IF ERRLEVEL 99 GOSUB SCREEN
- IF ERRLEVEL 99 GOTO L4
- IF ERRLEVEL 97 Let %!z = L1
- IF ERRLEVEL 97 GOSUB SCREEN
- IF ERRLEVEL 97 GOTO L1
- IF ERRLEVEL 87 Let %!z = L3
- IF ERRLEVEL 87 GOSUB SCREEN
- IF ERRLEVEL 87 GOTO L3
- IF ERRLEVEL 86 Let %!z = L6
- IF ERRLEVEL 86 GOSUB SCREEN
- IF ERRLEVEL 86 GOTO L6
- IF ERRLEVEL 85 Let %!z = L2
- IF ERRLEVEL 85 GOSUB SCREEN
- IF ERRLEVEL 85 GOTO L2
- IF ERRLEVEL 82 Let %!z = L9
- IF ERRLEVEL 82 GOSUB SCREEN
- IF ERRLEVEL 82 GOTO L9
- IF ERRLEVEL 73 Let %!z = L8
- IF ERRLEVEL 73 GOSUB SCREEN
- IF ERRLEVEL 73 GOTO L8
- IF ERRLEVEL 70 Let %!z = L7
- IF ERRLEVEL 70 GOSUB SCREEN
- IF ERRLEVEL 70 GOTO L7
- IF ERRLEVEL 68 Let %!z = L5
- IF ERRLEVEL 68 GOSUB SCREEN
- IF ERRLEVEL 68 GOTO L5
- IF ERRLEVEL 67 Let %!z = L4
- IF ERRLEVEL 67 GOSUB SCREEN
- IF ERRLEVEL 67 GOTO L4
- IF ERRLEVEL 65 Let %!z = L1
- IF ERRLEVEL 65 GOSUB SCREEN
- IF ERRLEVEL 65 GOTO L1
- IF ERRLEVEL 27 GOTO END
- IF ERRLEVEL 13 GOTO SELECT
- GOTO TOP
- :SCREEN
- rem The structure of this section is:
- rem 1) Place cursor at each menu choice's title in turn.
- rem 2) If this is the one the user pointed to, hilite it.
- rem 3) Otherwise, overwrite it with no hilite.
- rem 4) Place cursor at position for a title's descriptive text line.
- rem 5) If its menu choice title is hilited, then show the descriptive
- rem text. If not, do nothing.
- rem When recycling this code for a new program, this section takes
- rem the most rewriting.
- locate 4 2
- IF %!z = L1 ECHONOLF ▐ADDRBOOK▌
- IF NOT %!z = L1 ECHONOLF ADDRBOOK\\32
- locate 6 3
- IF %!z = L1 ECHONOLF ADDRess BOOK of Street Talk names (for E-Mail & personal information) ·
- locate 4 12
- IF %!z = L2 ECHONOLF ▐Users▌
- IF NOT %!z = L2 ECHONOLF Users\\32
- locate 6 3
- IF %!z = L2 ECHONOLF Users currently logged onto the VINES network ·
- locate 4 19
- IF %!z = L3 ECHONOLF ▐WHOAMI▌
- IF NOT %!z = L3 ECHONOLF WHOAMI\\32
- locate 6 3
- IF %!z = L3 ECHONOLF What is my Street Talk name/What server am I logged onto? ·
- locate 4 27
- IF %!z = L4 ECHONOLF ▐COPYD▌
- IF NOT %!z = L4 ECHONOLF COPYD\\32
- locate 6 3
- IF %!z = L4 ECHONOLF Copy source filespec to target filespec with safeguard builtin ·
- locate 4 34
- IF %!z = L5 ECHONOLF ▐DIR_List▌
- IF NOT %!z = L5 ECHONOLF DIR_List\\32
- locate 6 3
- IF %!z = L5 ECHONOLF Input a Filespec to receive information on those files (ex: C:\123\*.WK?) ·
- locate 4 44
- IF %!z = L6 ECHONOLF ▐ViewASCII▌
- IF NOT %!z = L6 ECHONOLF ViewASCII\\32
- locate 6 3
- IF %!z = L6 ECHONOLF ASCII Chart of Extended IBM characters 128-thru-255 (can be printed) ·
- locate 4 55
- IF %!z = L7 ECHONOLF ▐Format_A▌
- IF NOT %!z = L7 ECHONOLF Format_A\\32
- locate 6 3
- IF %!z = L7 ECHONOLF Format either a 360K or 1.2MB diskette in drive A: ·
- locate 4 65
- IF %!z = L8 ECHONOLF ▐Ignor▌
- IF NOT %!z = L8 ECHONOLF Ignor\\32
- locate 6 3
- IF %!z = L8 ECHONOLF Reserved for later expansion as needed ·
- locate 4 72
- IF %!z = L9 ECHONOLF ▐RunDOS▌
- IF NOT %!z = L9 ECHONOLF RunDOS\\32
- locate 6 3
- IF %!z = L9 ECHONOLF Run a single DOS command without exiting menu program ·
- RETURN
- :SELECT
- rem enter was pressed or one of the first letters of each choice
- rem This could be rewrittened as GOTO %!z, but it would be less
- rem readable.
- IF %!z = L1 GOTO L1
- IF %!z = L2 GOTO L2
- IF %!z = L3 GOTO L3
- IF %!z = L4 GOTO L4
- IF %!z = L5 GOTO L5
- IF %!z = L6 GOTO L6
- IF %!z = L7 GOTO L7
- IF %!z = L8 GOTO L8
- IF %!z = L9 GOTO L9
- GOTO TOP
- rem left cursor was pressed, positioning is determined
- :LTL1
- IF NOT %!z = L1 GOTO LTL2
- Let %!z = L9
- GOTO TOP
- :LTL2
- IF NOT %!z = L2 GOTO LTL3
- Let %!z = L1
- GOTO TOP
- :LTL3
- IF NOT %!z = L3 GOTO LTL4
- Let %!z = L2
- GOTO TOP
- :LTL4
- IF NOT %!z = L4 GOTO LTL5
- Let %!z = L3
- GOTO TOP
- :LTL5
- IF NOT %!z = L5 GOTO LTL6
- Let %!z = L4
- GOTO TOP
- :LTL6
- IF NOT %!z = L6 GOTO LTL7
- Let %!z = L5
- GOTO TOP
- :LTL7
- IF NOT %!z = L7 GOTO LTL8
- Let %!z = L6
- GOTO TOP
- :LTL8
- IF NOT %!z = L8 GOTO LTL9
- Let %!z = L7
- GOTO TOP
- :LTL9
- IF NOT %!z = L9 GOTO LTL1
- Let %!z = L8
- GOTO TOP
- rem right cursor was pressed, positioning is determined
- :RTL1
- IF NOT %!z = L1 GOTO RTL2
- Let %!z = L2
- GOTO TOP
- :RTL2
- IF NOT %!z = L2 GOTO RTL3
- Let %!z = L3
- GOTO TOP
- :RTL3
- IF NOT %!z = L3 GOTO RTL4
- Let %!z = L4
- GOTO TOP
- :RTL4
- IF NOT %!z = L4 GOTO RTL5
- Let %!z = L5
- GOTO TOP
- :RTL5
- IF NOT %!z = L5 GOTO RTL6
- Let %!z = L6
- GOTO TOP
- :RTL6
- IF NOT %!z = L6 GOTO RTL7
- Let %!z = L7
- GOTO TOP
- :RTL7
- IF NOT %!z = L7 GOTO RTL8
- Let %!z = L8
- GOTO TOP
- :RTL8
- IF NOT %!z = L8 GOTO RTL9
- Let %!z = L9
- GOTO TOP
- :RTL9
- IF NOT %!z = L9 GOTO RTL1
- Let %!z = L1
- GOTO TOP
- rem L1-L9 are the commands associated with each menu choice.
- rem Suggested continuations are L10-L##. You can choose where to
- rem restart the hilited choice from when taken back to the menu
- rem by changing the value of %!z variable.
- :L1
- addrbook
- Let %!z = L1
- goto TOP2
- :L2
- cls
- echo/
- echo/
- echo/
- users
- echo/
- echo/
- echo.
- gosub KLUDGWAT
- Let %!z = L2
- goto TOP2
- :L3
- CLS
- WHOAMI
- ECHO.
- ECHO.
- WHATZ
- echo.
- echo.
- echo.
- gosub KLUDGWAT
- Let %!z = L3
- goto TOP2
- :L4
- !COPYD
- Let %!z = L4
- goto TOP2
- :L5
- cls
- gosub BASICS
- rem fits within the info block of BASICS subroutines screen mask.
- locate 8 4
- echonolf █ Waiting █
- locate 9 4
- echonolf █ for █
- locate 10 4
- echonolf █ Input! █
- locate 15 1
- let %!z = *.*
- echonolf Input a valid filespec (ex: *.DOC):\\32
- read %!z
- dir %!z /p
- echo.
- gosub KLUDGWAT
- Let %!z = L5
- goto TOP2
- :L6
- rem Taken from Wenham's included program. Minor modifications.
- cls
- :start
- let %!z = 128
- :loop
- rem Calculate the line number to display the character on.
- let %!y = %!z
- sub %!y 128
- div %!y 8
- add %!y 1
- rem Calculate the column number to display the character on.
- let %!x = %!z
- sub %!x 128
- mod %!x 8
- mul %!x 10
- add %!x 1
- locate %!y %!x
- echonolf %!z = \\%!z
- add %!z 1
- if not %!z == 256 goto loop
- echo.
- echo Note: These characters can be inputted via most applications by holding
- echo down the 'Alt' key, typing in the appropriate number (number keypad
- echo only), and then releasing Alt.
- echo.
- echo Examples: Alt + 219 = █, Alt + 205 = ═, Alt + 171 = ½
- echo.
- gosub KLUDGWAT
- Let %!z = L6
- goto TOP2
- :L7
- rem Mini static menu.
- cls
- echo.
- :FORM
- locate 8 1
- echo Press 1 (360K diskette) or 2 (1.2 MB diskette) or ESC to abort
- getkey
- IF ERRLEVEL 50 Let %!z = A:
- IF ERRLEVEL 50 GOTO FORM2
- IF ERRLEVEL 49 Let %!z = A: /4
- IF ERRLEVEL 49 GOTO FORM2
- IF ERRLEVEL 27 Let %!z = L1
- IF ERRLEVEL 27 goto TOP2
- goto FORM
- :FORM2
- CLS
- locate 8 1
- if ERRLEVEL 50 ECHO ▄▄▄▄▄█ Format will be for 1.2 Megabytes █▄▄▄▄▄
- if ERRLEVEL 49 ECHO ▄▄▄▄▄█ Format will be for 360 Kilobytes █▄▄▄▄▄
- echo.
- echo.
- ECHO Hold Down CTRL and Press C to abort formatting Drive A:
- echo.
- rem We have two people using PC Tools 6.0. This test will take that into
- rem account. Five of our PC's have the DOS utilities stored in C:\DOS.
- rem The rest have it in C:\UTIL directory (local drive).
- IF EXIST C:\UTIL\FORMAT!.COM PCFORMAT %!z
- IF EXIST C:\UTIL\FORMAT.COM FORMAT %!z
- IF EXIST C:\DOS\FORMAT.COM FORMAT %!z
- Let %!z = L1
- goto TOP2
- :L8
- rem This was left for expansion.
- Let %!z = L1
- goto TOP2
- :L9 DOS
- cls
- gosub BASICS
- rem fits within the info block of BASICS subroutines screen mask.
- locate 8 4
- echonolf █ Waiting █
- locate 9 4
- echonolf █ for █
- locate 10 4
- echonolf █ Input! █
- locate 15 1
- Let %!z = dir
- echonolf Input a DOS command:\\32
- read %!z
- command /c %!z
- gosub KLUDGWAT
- Let %!z = L9
- goto TOP2
- :KLUDGWAT
- rem BATCOM has a problem with the WAITKEY command. Regardless of the key pressed,
- rem it is passed on. CLEARBUF, or even a subsequent KEYBUF/WAITKEY or WAIT won't
- rem counteract this. If the SECONDS_SECONDS worked properly, that could be
- rem used as a workaround. So, I guess this is the best method for now. That
- rem is to state that the key press is passed on.
- echo Wait 60 seconds or press spacebar to return to menu.
- echo Pressing any letter branches to that menu choice.
- waitkey 59
- return
- :MENU
- rem This was a text file of 24 rows by 80 columns that was converted
- rem into a executing screen .COM file with PC Magazine's MAKECOM.BAS
- rem program. This is included with DOS Power Tools, Bantam, 50 bucks.
- utilmask
- return
- :BASICS
- rem Generic screen routine that I use whenever asking the user to input
- rem a filespec. The empty box is for flashing messages.
- echonolf ╔══════════════════════════════════════════════════════════════════════════════╗
- echonolf ║ DOS BASICS ║
- echonolf ║ ║
- echonolf ║ Suggested Filenaming: A-Z, underscore, 0-9, begin with letter avoid dash(-) ║
- echonolf ║ Wildcards: Filenams.Ext = File????.Ex? = Fil*.E?t = F*.* = ????N*.??t = *.* ║
- echonolf ║ Directory Anatomy: C:\DIR\SUBDIR\SUBDIR2\Filespec.Ext ║
- echonolf ║ ╔════════════════╗ │ │ ├──────┘ └─Name of file(s) and Extension ║
- echonolf ║ ║ ║ │ │ └─Subdirectories with required "\" divider ║
- echonolf ║ ║ ║ │ └─1st Level directory preceded with required ":\" ║
- echonolf ║ ║ ║ └─Drive identifier A-E unless Network loaded then A-Z ║
- echonolf ╚═╩════════════════╩═══════════════════════════════════════════════════════════╝
- return
- :END
- rem ready to quit program.
- cls
- beep
- echo ╔═════════════════════════════════════════════════════════════════════╗
- echo ║ Type: UTILMENU ««« ««« ««« ««« {to reenter menu program} ║
- echo ╚═════════════════════════════════════════════════════════════════════╝
- exit
-