home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
e
/
easydoor.zip
/
EASYDOOR.DOC
< prev
next >
Wrap
Text File
|
1990-05-28
|
20KB
|
550 lines
Easy-Door V1.0 library for Quick-Basic 4.5
by Martin Bouchard,
1207 du Golf
Cap-Rouge, Quebec
Canada
G1Y 2T4
Easy-Door is a library that provides a convenient and easy way
to program your own doors with Microsoft Quick Basic.
Doors programmed with the Easy-Door library are QuickBBS
compatible doors.
Features of the Easy-Door library:
- Fast modem input/output
- Uses of the X00 fossil driver (C) Ray Gwinn
- Menu with programmables HOT KEYS like QuickBBS
- ANSI graphic sequence support
- Modem and keyboard/screen controls
- Automatic status bar with user's informations
- Automatic carrier detection
- Automatic time left verification
- Inactivity timeout verification
- Useful file sender with pause and stop option
- And a lot more!
Requirements:
- Quick Basic 4.5
- X00.SYS (fossil driver) See next page for info.
- ANSI.SYS driver (only if you want ANSI graphics)
- Easy-Door library
Note:
The X00.SYS driver is not included with Easy-Door. Thus,
this driver can be found on severals BBS. When you register
Easy-Door, the disk enclosed will contain the X00 fossil driver
and the registred Easy-Door library.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
Copying and Distribution:
Easy-Door may be copied and distributed freely. If you
dristibute Easy-Door on communications systems such as BBS or
CompuServe, The Source, Genie, etc, you must include the
following files as a set (using ARC, ZIP, LZH, PAK, etc.) No
fee other than a disk and handling charge (of up to 8$) may be
charged. The Easy-Door library is copyright and no modification
may be made to the library.
Caveats:
These routines have not caused me any problems, and seem to
be fully debuged. However, I will not be responsible for any
damages caused by use, misuse, or inability to use Easy-Door.
Description of files:
- EASYDOOR.DOC (Easy-Door documentation)
- EASYDOOR.LIB (Easy-Door module for compiling)
- EASYDOOR.QLB (Easy-Door module for QB environement)
- EASYDEMO.BAS (Sample demo for getting started)
- REGISTER.DOC (Registration form)
- LOCAL.DEF (Data file with user info.)
Description of a door:
A door is an external program that works in conjunction with
a Bulletin Board System (BBS). Doors are difficult to program
because they have to use the modem input/output commands, ANSI
character display, carrier detection, inactivity time out, time
left, hot keys, status bar, etc. So that's what Easy-Door is
for. It's a sample way to program doors with minimal efforts
and programming time.
Fossil driver:
A fossil driver is a program that controls different things.
X00.sys is a communication driver (X00.sys is copyright by Ray
Gwinn). Every QuickBBS system needs it's own X00.sys driver.
So, you don't have to distribute the X00.sys driver with your
door program.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
Registration:
The Easy-Door library is NOT public domain, it's SHAREWARE.
It means that you have to pay registration fees (25$) if you
use the Easy-Door library in your programs. The registration
cost is minimal and will allow the author to write new and
improved versions of the Easy-Door library. Please note that
the unregistered version is the same as the registered version
except that a special screen is displayed each time an Easy-
Door program is run. Registered users will receive a disk
containing the Easy-Door library and the X00 communication
fossil driver (Copyright Ray Gwinn).
*** Last minute note: ***
Easy-Door V1.1 is now available if you register your Easy-
Door. New routines are ANSI locate, sound, optional automatic
reboot after lost of carrier, send function with colors, etc.
How to install Easy-Door?
To install Easy-Door follow these steps:
- Copy EASYDOOR.LIB and EASYDOOR.QLB in the directory
where you put your library files (Ex. BCOM45.LIB)
- Copy LOCAL.DEF in the directory where you put your
.BAS files.
- Install X00.SYS in your CONFIG.SYS (see your X00.SYS
documentation)
- Start Quick Basic with the following syntax:
QB /l EasyDoor
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
How to use Easy-Door library routines?
To use the Easy-Door library, you must first load Quick-
Basic with the (QB /l EasyDoor) statement. Each routine must me
CALLed:
Ex. CALL Init ' Initialize Easy-Door
CALL ModemInput ("Your firstname? ", firstname$, 30)
Every Easy-Door variables are strings or integer. So, when
you use numeric variable put the % sign after the variable name
or put a DEFINT A-Z at the beginning of your program.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
Technical information about Easy-Door.
Easy-Door provides an easy alternative to program your own
door easily. You don't have to care about opening the
communication port. Easy-Door, will automatically get wich of
the serial port is in use by the BBS.
To access the communication port, Easy-Door uses the X00
fossil driver (Copyright Ray Gwinn). Consequently, you can
access the communication port at high rate. To obtain ANSI
graphic, you must install the ANSI.SYS or compatible driver
(ZANSI, NNANSI, etc.) in your CONFIG.SYS if it's not already
installed.
Each time an Easy-Door command is made, Easy-Door check if
the user has disconnected (if there's a lost of carrier). Also,
Easy-Door check the timelimit of the user and for an inactivity
time out (after 2 minutes of inactivity, Easy-Door will hang up
the line and will return to the BBS).
A very useful option of Easy-Door is hot keys. Hot keys are
keys that the user can press during the transmission of a menu.
So, the user doesn't have to wait at the end of the
transmission to press the key of his desired option. Hot keys
are difficult to program, but with the Easy-Door library it's
just fun to use.
User informations are read in a file that QuickBBS produces
every time a door is run. This file is DORINFO1.DEF. But if you
don't run the door from a BBS, Easy-Door will read a file named
LOCAL.DEF.
The contents of DORINFO1.DEF or LOCAL.DEF is the following
DELTA-BBS (Name of the BBS)
MARTIN (SysOp's fistname)
BOUCHARD (SysOp's lastname)
COM1 (COM port number, COM0 = local use)
0 (Nothing, just a 0)
DAVE (User's firstname)
SMITH (User's lastname)
DAYTONNA, FL (User's city)
1 (1=ANSI 0=ASCII)
40 (Security level)
24 (Time remaining in minutes)
These informations are only for technical purposes, so you
don't need to access those files.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
CenterBox (TextLine1$, TextLine2$)
Displays a window in the center of the screen with two
lines of centered text inside it. This window is only
seen on the host screen.
Example:
CALL CenterBox ("Text line# 1", "Text line #2")
ChangeDTR (DTR%)
Change the Data Terminal Ready (DTR) status on the
current serial port. A value of one will raise the DTR,
and a zero will lower it. On most modems, lowering the
DTR will force the modem to hang up.
Example:
CALL ChangeDTR (0) ' Put the DTR low
CALL ChangeDTR (1) ' Put the DTR high
CheckCD
Forces Easy-Door to check if there is a lost of
carrier on the current serial port. If there is no
carrier, the program will be terminated and will return
to DOS (returning control to QuickBBS when the door is
installed on a BBS). This routine is not usually used
because Easy-Door performs an automatic carrier
detection each time inputs/outputs are made. But it can
be uses if no modem input/output is made for a long
time (like sorting a string array)
Example:
CALL CheckCD ' Force Easy-Door to check for carrier
GetChar (Char$)
Returns either a one-character string containing a
character read from the modem/keyboard buffer or a null
string ("") if no character is pending. This routines
is like the Quick Basic INKEY$ statement but reads
character from the modem and the keyboard.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
HangUp
Disconnects the user by hanging up the line.
Example:
CALL HangUp ' Disconnect the user online
Init
This routine is the most important of all. It performs
initialization to the modem, read the user informations
and a lot more. You must call this routine before
calling any other Easy-Door routines. If you omit to do
this, your program will not work.
Example:
CALL Init ' Initialize Easy-Door ** Very important **
Linefeed (NumberOfLinefeed%)
Send one or more linefeeds (change of line) to the
modem and to the screen.
Example:
CALL linefeed(3) ' Send 3 linefeeds
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
MiscInfo (InfoNumber%, Info$)
Returns miscellaneous informations. You give the number
of the information you want and Easy-Door returns it in
a string variable.
Information # Contents
1 User's firstname
2 User's lastname
3 User's city
4 1=ANSI 0=ASCII
5 User's security
6 Remaining time when user entered
the door (min.)
7 Communication port in use (Ex.
COM2)
8 Communication parameters (Ex.
1200,N,8,1)
9 Sysop's firstname
10 Sysop's lastname
11 BBS's name
Example:
CALL MiscInfo (1, Firstname$)
CALL SendCR ("Welcome " + Firstname$)
ModemInput (Prompt$, Answer$, MaxLen%)
Inputs a string from the modem or the keyboard. You
have to specify the maximum length of the string. If
you do not want a prompt, use a null string ("").
Example:
CALL ModemInput ("Your name: ", Name$, 25) ' Ask the
name of the user with no more then 25 characters.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
ModemInputChar (Char$)
Inputs a character from the modem or the keyboard. This
routine will wait for one character and return control
to the program after.
Example:
CALL ModemInputChar (K$)
PRINT "You pressed the "+k$+" key."
ModemOnlySend (String$)
Sends a string of characters only to the modem, not to
the screen.
PurgeInBuffer
Clears all the pending characters in the modem and the
keyboard input buffer.
PurgeOutBuffer
Clears all the characters in the output buffer not
already transmitted.
ReturnBBS
You must use this routine to return to the BBS. DO NOT
USE the END statement. Also, this routine will display
a window that will announce the return to the BBS.
Example:
CALL ReturnBBS ' Exit the DOOR and return to the BBS.
Send (String$)
Sends a string of characters to the modem and to the
screen.
Example:
CALL Send ("Welcome to this door!")
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
SendCLS
Sends a clear screen code (ASCII CODE 12).
SendCR (String$)
Same as the Send routine except a linefeed is sent at
the end of the line.
SendFile (Filename$, Option%)
Sends a file for viewing purpose. During the
transmission, the user can press keys (P and S) to
pause or stop viewing the file.
Option% = 0 (Enables the user to stop and pause the
display)
Option% = 1 (Enables the user to only pause the
display, the user can't stop the
display.)
Example:
CALL SendFile ("EasyDoor.doc", 0)
SendMenu (Menuname$, HotkeysList$, Keypress$)
Sends a menu file. During the transmission, the user
may press a key in the hot keys list. The menu name
must be a filename with no extension. Easy-Door will
add .ASC or .ANS to the file name depending if the user
has ASCII or ANSI graphics.
Example:
CALL SendMenu("Menu", "DUQ", k$) ' Transmit the
Menu.ASC or Menu.ANS
file and wait for
D,U or Q key.
Easy-Door library for Quick Basic
Copyright (C) Martin Bouchard
SendString (String$, HotkeysList$, Keypress$)
Sends a string of characters and checks if a hot key
was pressed during the transmission. If no key is
pressed when the string was sent, Easy-Door will wait
for one of the characters in the hot keys list.
Example:
S$="M=Return to main menu Q=Quit this DOOR"
CALL SendString (S$, "MQ", K$)
PRINT "The user has pressed the "+K$+" key."
SpecialCLS
Clears the screen and redraws the bottom status bar.
Example:
CALL SpecialCLS ' Clear the screen and redraw the
status bar.
Timeleft (Minleft%)
Returns the number of minutes left the user has
Example:
CALL Timeleft (Time%) ' Ask the time left.
TimeLeft$ = STR$ (Time%) ' Put the value in a string
CALL Send ("Timeleft = " + Timeleft$ + " minutes.")
*** END ***
Thank you for using the Easy-Door library. Hope it's useful
to you like it's to me. You don't know, maybe you'll make a
shareware door with Easy-Door. So, please register the Easy-
Door library!
The author,
Martin Bouchard