Category : Miscellaneous Language Source Code
Archive   : MKMENU.ZIP
Filename : MAKEMENU.DOC
Output of file : MAKEMENU.DOC contained in archive : MKMENU.ZIP
MAKEMENU.DOC
DISTRIBUTED AS SHAREWARE
COPYRIGHT (C) JERRY ADKINS 1992
Jerry Adkins
7770 Regents Rd. Suite 113-226
San Diego, CA 92122
Compuserve ID: 70455,112
Prodigy ID: WHPC17A
After creating somewhere near my millionth slidebar menu, I decided to let the
computer do most of the coding for me. The result is MAKEMENU, a program
written in Turbo C, that creates slidebar menu programs in Turbo C, BASIC,
DBASE, and Turbo Pascal. It occured to me, that other programmers might find
MAKEMENU of use. MAKEMENU was not designed to compete with those great user
interface design programs. It does a simple job of creating pretty little slide
bar menus. However, at the $10 registration fee, the price is right.
If you find MAKEMENU of benefit, please fill out the registration form and mail
it in.
------------------------------------------------------------------------------
MAKEMENU REGISTRATION FORM
MAIL TO:
JERRY ADKINS
7770 REGENTS RD. SUITE 113-226
SAN DIEGO, CA 92122
NAME: __________________________________ COMPANY:_____________________________
STREET: ________________________________ CITY: _______________________________
STATE: ________________ ZIP: ________________
WHAT SOURCE DISTRIBUTED MAKEMENU TO YOU? _____________________________________
MAKEMENU VERSION DESIRED: (CIRCLE ONE).
(1) MAKEMENU WITH COMPACT MODEL C LIBRARY
AND TURBO PASCAL 6.0 TPU FILES $10
(2) MAKEMENU (ALL MODELS) WITH C LIBRARY
SOURCE AND PASCAL TPU SOURCE $20
(Owners of (1) may upgrade to (2) at any time)
DISK FORMAT DESIRED: (CIRCLE ONE).
(1) 3.5 INCH 720K
(2) 5.25 INCH 360K
SUGGESTIONS:
------------------------------------------------------------------------------
MAKEMENU.DOC INDEX
------------------------------------------------------------------------------
STARTUP SCREEN PAGE 1
CREATE NEW MENU FILE PAGE 2
LOAD MENU FILE FROM DISK PAGE 3
SAVE MENU FILE TO DISK PAGE 3
GENERATE SOURCE CODE PAGE 4
EDIT MENU COLORS PAGE 5
MENU IDEAS PAGE 6
COMPILING GENERATED PROGRAMS PAGE 7
COMING ATTRACTIONS PAGE 8
------------------------------------------------------------------------------
PAGE 1 - STARTUP SCREEN:
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ MAKEMENU ³
³ COPYRIGHT (C) JERRY ADKINS 1992 ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ CREATE NEW MENU FILE ³
³ EDIT MENU FILE ³
³ LOAD MENU FILE FROM DISK ³
³ SAVE MENU FILE TO DISK ³
³ GENERATE SOURCE CODE ³
³ EDIT MENU COLORS ³
³ QUIT ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;
The startup screen allows you to select options with the up/down arrow keys
and ENTER. Your generated programs will look much like this screen. Menus
generated in Turbo C have two different style menus.
------------------------------------------------------------------------------
PAGE 2 - CREATE NEW MENU FILE:
Creating a new menu is as simple as entering text. Although you are allowed
five lines for a title, menus with a lot of options should keep titles to a
minimum to make more room for the menu options.
For each menu option, there are three entries: LINE, ACTION, and HELP. You
may toggle between these entries with the TAB key.
Each LINE entry is the text that will be displayed in the actual menu. Each
corresponding ACTION entry is the statement that will be executed when any
LINE is highlighted by the slidebar. The corresponding HELP entry will be
highlighted just below the last menu option. This changes as new options are
highlighted.
TITLE 1 : MY TEST MENU
TITLE 2 : CREATED BY JERRY ADKINS
TITLE 3 :
TITLE 4 :
TITLE 5 :
LINE 1 : DOS DIRECTORY ACTION: system("dir");getch()
LINE 2 : CHECK DISK ACTION: system("chkdsk");getch()
LINE 3 : WORD PROCESSING ACTION: system("wp")
LINE 4 : SPREADSHEET ACTION: system("lotus")
LINE 5 : QUIT ACTION: exit(0)
HELP: DO A DOS DIR COMMAND
HELP: RUN CHKDSK PROGRAM
HELP: RUN WORD PERFECT
HELP: RUN LOTUS 123
HELP: EXIT TO DOS
In the above example, we are only using five options. There is a maximum of
fifteen options, with the exception of Dbase and the Turbo C menu #1, which
has a maximum of nine options.
The ACTION entries are unique to each language. If you are only experimenting
with MAKEMENU, leave these options blank. That way, you can create programs in
any of the four supported languages and they should compile with no trouble.
------------------------------------------------------------------------------
PAGE 3 - LOAD MENU FILE FROM DISK:
A MENU file consists of all the menu options. This is all that is needed to
generate your program. These files are saved with the SAVE MENU FILE option.
The same MENU file can be used to generate programs in any of the four computer
languages supported. The only difference is the ACTION statements which are
supplied by you and are unique to each language.
BASMENU.MEN³
MENU.MEN³
TPMENU.MEN³
TCMENU.MEN³
FILENAME: MENU.MEN
SAVE MENU FILE TO DISK:
After you create a new menu, or edit a previously saved menu, use this option
to save the menu file. Each menu file holds all the menu and color options to
generate your menu program or function. These files are only a little over 2k
apiece, so you could save dozens of them to a diskette.
------------------------------------------------------------------------------
PAGE 4 - GENERATE SOURCE CODE:
MAKEMENU has the ability to create programs in BASIC, DBASE, C, and PASCAL.
In the example below, we are creating a menu program in BASIC. Since GWBASIC
and BASICA require line numbers and most COMPILERS do not, you are provided
with the option to use line numbers or not. There are no GOTO statements
written in the code, so labels aren't even needed. Hopefully, the source code
written by MAKEMENU will help serve as an example that a fairly complex program
can be written without excessive use of the GOTO.
If you answer "Y" to the USE LINE NUMBERS question, you may provide the
starting line number and the increment. For instance, you could have the
code start at line 1000 with an increment of 5. That way, you would have
line 1000, 1005, 1010, etc. If you are using a BASIC compiler, it is
suggested that you don't use line numbers.
CHOOSE LANGUAGE
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ BASIC ³
³ DBASE III + ³
³ TURBO C 2.0 ³
³ TURBO PASCAL 6.0 ³
³ ABORT ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;
CREATE BASICA/GWBASIC CODE
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ SAVE FILE ]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ BASIC FILENAME TO SAVE: BASMENU.BAS ³
³ USE LINE NUMBERS? (Y/N) : Yes ³
³ STARTING LINE NUMBER: 10 ³
³ INCREMENT BETWEEN LINES: 10 ³
³ ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;
ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[ SAVE FILE ]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸
³ CREATING BASIC FILE BASMENU.BAS ... ³
³ ³
³ ³
ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;
After the program is created, you may compile it, or include it in an existing
program you may be working on. If you used line numbers, you can run it from
BASICA, or GWBASIC at the DOS prompt:
basica basmenu
------------------------------------------------------------------------------
PAGE 5 - EDIT MENU COLORS:
This option allows you to change the colors in the generated menus. A screen
of 15 colors will be displayed. Type in the colors when prompted. The correct
code will be generated in your programs to produce the colors.
COLOR: 0
COLOR: 1
COLOR: 2
COLOR: 3
COLOR: 4
COLOR: 5
COLOR: 6
COLOR: 7
COLOR: 8
COLOR: 9
COLOR: 10
COLOR: 11
COLOR: 12
COLOR: 13
COLOR: 14
COLOR: 15
SCREEN BACKGROUND COLOR 0
MENU TEXT COLOR 15
MENU BAR COLOR 4
MENU BACKGROUND COLOR 1
------------------------------------------------------------------------------
PAGE 6 - MENU IDEAS:
The generated menus are intended mostly for creating menu code to be included
in a program. The programmer does the rest.
One interesting use, however, could be a DOS menu that runs from a BATCH file
with branching done by the ERRORLEVEL dos function. A menu could return an
errorlevel to DOS. This is done in Pascal with the Halt(n) procdure. It is done
in C with the exit(n) function. The following is an example menu text that is
intended for Pascal. The advantage of this system is it takes no memory away
from the application.
TITLE 1 : MENU SYSTEM
TITLE 2 : CREATED BY JERRY ADKINS
LINE 1 : WORD PROCESSING ACTION: Halt(100);
LINE 2 : SPREADSHEET ACTION: Halt(90);
LINE 3 : INVOICING ACTION: Halt(80);
LINE 4 : PRODIGY ACTION: Halt(70);
LINE 5 : QUIT ACTION: Halt(60);
HELP: WORD PERFECT
HELP: LOTUS 123
HELP: DBASE INVOICE PROGRAM
HELP: LOG ON TO PRODIGY
HELP: EXIT TO DOS
We will use the example to generate a program called MYMENU.PAS
After the Pascal code is created and compiled, you could then write a DOS batch
file called MENU.BAT which looks something like this: Yes, I used GOTO to avoid
having to break it down into several BATCH files.
@echo off
:start
cd\
cls
mymenu
if errorlevel 100 goto WP
if errorlevel 90 goto 123
if errorlevel 80 goto INVOICE
if errorlevel 70 goto PRODIGY
if errorlevel 60 goto end
goto start
:WP
cd \wp
wp
goto start
:123
cd \lotus
lotus
goto start
:INVOICE
cd \invoice
dbase invoice
goto start
:PRODIGY
cd \prodigy
prodigy
goto start
:end
------------------------------------------------------------------------------
PAGE 7 - COMPILING GENERATED PROGRAMS:
For our examples, we will use the following source code names (default).
TURBO C
tcc -mc tcmenu menulib.lib
The library files are compiled using the compact model, so you will need to
use the -mc option. If you ordered the library source code, you can rebuild the
library with the BUILDLIB.BAT batch file. If you want a different memory model,
modify the BUILDLIB.BAT file and change the -mc options. This will allow you to
compile using your favorite memory model.
TURBO PASCAL 6.0
tpc /m tpmenu
The needed units are compiled with Turbo Pascal 6. If you have the source code
to the TPU files and you have a earlier version (4.0 +), you can rebuild the
program with:
tpc /b tpmenu
DBASE
dbase dbmenu
The generated program should run in interpreted DBASE, or compiled with a
DBASE compiler, such as CLIPPER.
BASIC
basica basmenu
The generated program runs under BASICA or GWBASIC, if you used the line
number option. It should compile with BASCOM, QBASIC, or QUICK BASIC with, or
without line numbers. No goto statements or labels are used in the code. You
may still use labels and GOTO in any program that uses your generated menu.
------------------------------------------------------------------------------
PAGE 8 - COMING ATTRACTIONS:
Improvements to future versions of MAKEMENU include:
MOUSE SUPPORT for both MAKEMENU and the generated programs.
Ability to locate a menu anywhere in the screen before generating program.
Multiple action statements for each menu option.
Send your suggestions along with your registration. They will be given the
utmost consideration.
*
Turbo Pascal ,Turbo C, and Dbase are trademarks of Borland International.
QUICK BASIC is a trademark of Microsoft.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/