home *** CD-ROM | disk | FTP | other *** search
- Documentation for GENHELP.ARC
- Written By James J. Orlowski, M.D. & John Willis
- Authors Of CLIPSCRN.ARC CLIPSCR2.ARC
-
- This submission to NANSIG contains the files needed to make
- a generalized help screen system using text files. It is a
- generalization of the program DBUHELP.PRG developed by
- Denny Diaz used in DBU.
-
- The main program is GENHELP.EXE which was written in
- Quick Basic 4.0 and converts a textfile to a file that can
- be used by the FUNCTION HELPTEXT(), which is copied verbatim
- from the DBUHELP.PRG files used by Denny Diaz.
-
- The text file MUST be in the format:
-
- /01Demonstration Of Help Files <-- 1 line header used by PROCEDURE genhelp
- Write Your Text Here. <-- help text must begin on next line here
- More Text. <-- up to the next '/' or EOF()
- Still More Text <-- (don't skip line between help sections)
- /02Demonstration help screen 2 <-- '/' must be 1st character in header line
- More Text. <-- help text for section 02.
-
- It is important that the text file include the '/' as the first character
- in the line and followed by a 2 digit number. The program will allow
- up to 64 help messages, and they MUST be in order to proper heading of
- new "helpfile". This is NOT a limitation to the system since multiple
- help files can be used by the PROCEDURE genhelp as will be explained
- below. The textfile MUST be in ASCII format, and should have the
- same margins that will be used in the MEMOEDIT() function called within
- the help.prg. In the demonstration programs, the margin is 65 characters.
-
- Basically GENHELP looks for the '/' within the textfile and assigns the
- FOURTH character in this line (i.e. first character after '/01') as the
- first 2 byte integer signifying the start of the text and counts
- the length of the text up to the next '/' as the second 2 byte integer
- as described in the section at the beginning of helptext() within help.prg.
- This also means that the '/01' will not be shown on the screen.
- Since ASCII characters are used to signify each of the 2 byte integers,
- this means that you are allowed up to (256 * 256) chars - 1 (approximately
- 64K) as the maximum text length of the "helpfile".
-
- I don't know why Mr. Diaz did not use the header information instead of
- making an array of headers for his help system, but this has been corrected
- with GENHELP.ARC.
-
- GENHELP.EXE asks 3 questions
- 1.) Enter Source File:
- 2.) Enter Target File:
- 3.) Enter Number Of Help Messages
-
- In the office.txt file contained in this demo, the answers to these
- questions are:
- 1.) office.txt
- 2.) office.hlp
- 3.) 13
-
- PLEASE NOTE: THERE IS VIRTUALLY NO ERROR CHECKING WITHIN GENHELP.EXE SO:
- 1) IT WILL OVERWRITE ANY FILE LISTED IN ANSWER TO QUESTION # 2, WHICH
- IS ACTUALLY WHAT YOU WANT IT TO DO ANYWAY WHEN YOU UPDATE YOUR
- HELP MESSAGES.
- 2) RESULTS ARE ENTIRELY UNPREDICTABLE IF YOU ENTER THE WRONG NUMBER OF
- HELP MESSAGES TO QUESTION # 3 OR DO NOT USE THE PROPER FORMAT FOR
- THE SOURCE FILE.
- IT IS JUST A QUICK AND DIRTY UTILITY THAT GETS THE JOB DONE.
- Quick Basic Does complain if you enter a nonexistent source file to read in.
-
- Within your application program, you must include the following
- public variables for use with help.prg:
-
- PUBLIC helpfile, help_code
- helpfile = "OFFICE.HLP" && name of new help file
- help_code = 0 && must correspond to appropriate '/01' section
- && within help text
-
- You can use multiple helpfiles by changing the name of the
- helpfile memvar thus allowing an infinite number of help files
- for your application each including up to the 64 help messages
- within each approximately 64K helpfile
-
- You must number the help_code within your application, or
- you can set the help_code within the help.prg such as I did to
- number the help_code to the menunum associated with the
- MENU TO menunum routine used in DEMOHELP.PRG .
-
- To get the demonstration to work, you need to link as follows:
-
- 1.) TLINK /x /l /n demohelp help, demohelp,,clipper,extend
-
- OR 2.) PLINK86 FI demohelp,help LIB clipper,extend
-
- DEMOHELP.PRG was written using hard coded colors and I don't know
- if it can be used on a monichrome monitor or with a CGA system, since
- it was only tested on an EGA system.
- PLEASE NOTE: Both DOWNHELP.OBJ And HELP.OBJ Files Were Compiled
- With The First Version Of SUMMER87 Since I Still Have NOT Received
- The Corrected SUMMER 87 UPDATE After 3 Weeks, Even Though I Live
- Less Than One Hour From Los Angeles. THUS, You Will Have To Link
- With The First Version Of SUMMER87 To See The DEMOHELP.PRG.
-
- I Am Sorry For The Inconvenience Of Not Having The Latest Version,
- But Blame This One On Nantucket. HOWEVER, I have included the source for
- help.prg, which for your application can consist only of:
-
- PARAMETERS call_prg, line_num, input_var
- IF call_prg = "HELP" .OR. call_prg = "MEMOEDIT" .OR. call_prg = "GENHELP" ;
- .OR. help_code = 0
- RETURN
- ENDIF
- DO genhelp
- RETURN
- * plus the PROCEDURE genhelp and FUNCTION helptext.
-
- This can be compiled and linked with your application under the
- updated version of SUMMER87, and PROCEDURE genhelp does use the
- ISCOLOR() function to set the proper colors for monichrome.
-
- ----------------------------------------------------------------------
- John and I are releasing demohelp.arc into the public domain. You are
- free to distribute it to other bulletin boards provided that you
- include the first five files and check with Nantucket whether
- it is OK to include help.prg which contains a portion of Danny Diaz's
- HELPTEXT() function within the file DBUHELP.PRG., which is
- copyright 1986,1987 By Nantucket. We make no guarantees and will not
- be responsible for any damages caused by using these programs
- except for the usual statment "It worked for us..."
-
- 1.) genhelp.doc (this file)
- 2.) genhelp.exe (utility to convert text files that can be
- used with helptext() function written by
- Denny Diaz of Nantucket)
- 3.) office.txt (sample text file to convert with GENHELP.EXE
- to office.hlp for use with demohelp.exe example)
- 4.) demohelp.obj (obj file containing demonstration menu program
- using genhelp system)
- 5.) help.obj (obj file already linked for use with demo)
- 6.) help.prg (text of help.obj)
-
- I Am NOT Including The Source Code For DEMOHELP.PRG and GENHELP.EXE Since
- They Add To The Size Of The ARC File And Are Not Really Needed To Use
- Genhelp.exe And The Demonstration Program. For Those Of You Who Feel They
- Must Always Have Source Code For Everything, Please Send A 360 KB Or
- 1.2 MB Floppy Disk And $10 For The Staff Time To Process It.
-
- A WORD ABOUT THE AUTHORS
- John Willis writes professional oil drilling software programs
- for microcomputers.
-
- James Orlowski writes medical office programs using Clipper.
-
- Any correspondence should be sent to
- James Orlowski, M.D.
- 451 West Gonzales Road, # 150
- Oxnard, CA 93030
-
-