home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
vrac
/
easydr26.zip
/
EASYDR26.DOC
< prev
next >
Wrap
Text File
|
1994-09-08
|
53KB
|
1,508 lines
The Easy-Door Library
Version 2.60
for QuickBasic 4.5, PDS 7.1
and Visual Basic DOS V1.0
(c) Copyright 1990-94, All rights reserved by
Martin Bouchard
1207 du Golf
Cap-Rouge, QC
CANADA
G1Y 2T4
FidoNet Node: 1:240/291
Support BBS:
Node 1: (418) 658-6769 (V.32 bis)
Node 2: (418) 659-6120 (V.32 bis)
The Easy-Door Library V2.60 /2
Table of contents
-----------------
Introduction....................................................3
Features of the Easy-Door library...............................3
Requirements....................................................3
Copying and Distribution........................................4
Description of files............................................4
Disclaimer......................................................4
Description of a door...........................................5
Fossil driver...................................................5
Registration....................................................5
How to use the Easy-Door library routines?......................6
Technical information about Easy-Door...........................6
Description of .BI file.........................................7
Structure of an Easy-Door door program..........................7
Configurable parameters.........................................8
EASYANSI.BI Module..............................................9
AUTOBBS.BI Module..............................................10
Easy-Door function keys........................................10
Easy-Door SUB and FUNCTION.....................................11
Note from the author...........................................30
Special thanks.................................................30
How to contact us?.............................................30
The Easy-Door Library V2.60 /3
Introduction
------------
Easy-Door is a library that provides a convenient and easy way to
program your own doors with QuickBASIC, PDS and Visual Basic for
DOS.
Doors programmed with the Easy-Door library are compatibles with
the following BBS systems:
QuickBBS, Remote Access, RBBS, SuperBBS, Telegard, WildCat 3,
Force!, PcBoard (latest), GAP, WildCat, Genesis, Spitfire, WWIV,
Osiris and others BBS software that uses a compatible format with
one mentioned above.
Features of the Easy-Door library
----------------------------------
- ANSI and Avatar/0+ support
- RIP (Remote Imaging Protocol) support
- Fossil driver or built-in communication routines
- Multitaskers aware (DV, WIN, OS/2, etc.)
- Fast and reliable modem input/output
- Supports all communication ports
- Automatic time left verification
- Automatic carrier detection
- Automatic status bar
- Automatic inactivity time-out verification
- Simultaneous modem and keyboard control
- All text & messages are fully customizable
- Menu routines with hot keys
- Sysop DOS shell function
- Built-in chat mode
- Text file sender
- And lot more...
Requirements
------------
- IBM compatibles Computer running DOS 3.0 and more
- QuickBasic 4.5 / PDS 7.1 / Visual Basic for DOS
- The Easy-Door library
The Easy-Door Library V2.60 /4
Copying and Distribution
------------------------
Easy-Door may be copied and distributed freely. If you distribute
The Easy-Door Library on communication systems such as a BBS or
CompuServe, The Source, Genie, etc., you must include the
following files as a set (using ARC, ARJ, ZIP, LZH, PAK, SQZ,
etc.). No fee other than a disk and handling charge (of up to 5$)
may be charged. The Easy-Door library is copyrighted material and
no modification may be made to the library.
Description of files
--------------------
- VB_EDR.LIB Easy-Door library for Visual Basic 1.0
- QB_EDR.LIB Easy-Door library for QuickBasic 4.5
- BC_EDR.LIB Easy-Door library for PDS 7.1
- VB_EDR.QLB Easy-Door QuickLibrary for Visual Basic 1.0
- QB_EDR.QLB Easy-Door QuickLibrary for QuickBasic 4.5
- BC_EDR.QLB Easy-Door QuickLibrary for PDS 7.1
- EASYDOOR.BI Easy-Door SUB/FUNCTION declaration
- EASYANSI.BI Include file for ANSI color code declaration
- EASYPARA.BI Include file for configurable parameters
- AUTOBBS.BI Module for semi-automatic BBS detection
- EASYDR26.DOC Easy-Door documentation
- REGISTER.DOC Registration form
- UPGRADE.TXT A note to previously registered users
- EASYDOOR.REV Easy-Door's revision history
- EDRDEMO.EXE Easy-Door demo. A door made with the library
- EDRDEMO.BAS BASIC Source code for the EDRDEMO.EXE program
- SHUTTLE2.ANS ANSI file used by EDRDEMO
- SHUTTLE2.AVT AVATAR/0+ file used by EDRDEMO
- TESTDOOR.BAS Simple door frame for getting started
Disclaimer
----------
These routines have not caused us any problems, and seem to be
fully debugged. However, we will not be responsible for any
damages caused by use, misuse or inability to use Easy-Door.
The Easy-Door Library V2.60 /5
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 modem input/output commands, ANSI and
Avatar/0+ display, carrier detection, inactivity time out, hot
keys, status bar, etc. This is where Easy-Door can be used. It
makes the usually tedious task of programming doors much easier,
and hence cuts the time of program development.
Fossil driver
-------------
A fossil driver is a resident program that takes control of modem
operations. Two well-known fossil drivers are X00 and BNU. Fossil
drivers gives reliability, speed, compatibility with non-standard
communication ports.
This version of Easy-Door introduce a very handy feature:
Easy-Door has now the capabilities of using built-in commu-
nication routines if a fossil driver is not installed. That means
that doors made with the Easy-Door library can run on a wide
variety of BBS systems without modification.
Registration
------------
The Easy-Door library is NOT public domain, it's SHAREWARE. This
means that you have to pay a registration fee of $25 US if you
decide to 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 credit screen is displayed each
time an Easy-Door program is executed.
The registered version of Easy-Door does not display any
advertising message. Registered users will receive a disk
containing the latest version of the Easy-Door library with a
unique encrypted user identification code plus their own
Easy-Door serial number. Upgrades are allways FREE and available
on our support BBS. See the section "How to contact us?" for the
phone number of our BBS.
The Easy-Door Library V2.60 /6
How to use the Easy-Door library routines?
------------------------------------------
To use the Easy-Door library, you must tell the programming
environment that you're using Easy-Door:
QuickBasic users: QB /l QB_EDR
PDS users: QBX /l BC_EDR
Visual Basic users: VBDOS /l VB_EDR
Each routine is used like it was built in the BASIC language:
E.g.: K$ = GetChar$
SendCR "This line is sent to modem and screen"
All Easy-Door parameters are strings or integers. So, it's a good
idea to put a DEFINT A-Z statement at the beginning of your
programs. Refer to your BASIC manual for more help on data type.
Technical information about Easy-Door
-------------------------------------
Easy-Door provides an easy alternative for writing your own
doors. For example, you do not have to pay attention about
opening the communication port. Easy-Door will automatically
determine which serial port is in use by the BBS.
To access the communication port, Easy-Door uses fast and
reliable communication routines. Consequently, you can access the
communication port at a high speed rate. There is no need for a
special driver to use ANSI or AVATAR/0+ control sequence. They
are completely integrated in Easy-Door.
Each time an Easy-Door command is called, Easy-Door checks if the
user has disconnected. Also, Easy-Door checks the daily time
limit of the user. After a configurable inactivity time-out,
Easy-Door will hang up and will return control to the BBS
automatically.
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
there is no need to wait for the end of the transmission to press
a key. Hot keys are difficult to program, but with the Easy-Door
library it's a pleasure to use.
The Easy-Door Library V2.60 /7
User information is read in a file that each BBS program produces
every time a door is run. This file is different for each type of
BBS. Easy-Door supports lot of them. But if you do not run the
door from a BBS, Easy-Door will automatically put the door in
local mode.
Please look at the "AUTOBBS.BI" section for a list of BBS
compatibles with Easy-Door.
Description of .BI file
-----------------------
Files that have the .BI extension (Basic Include) are modules
that you include in your programs. Those files are necessary to
use Easy-Door because they contain initialization code and
procedure. Read those files for more information on each one. To
include a .BI file in your program type you have to use the
$INCLUDE metacommand. Refer to your BASIC manual for more
information on how to include files in your source code.
E.g.: ' $INCLUDE: 'EasyDoor.BI'
Structure of an Easy-Door door program
--------------------------------------
DEFINT A-Z Sets all variable has integer
by default.
'$INCLUDE:'EasyDoor.BI' Easy-Door SUB/FUNCTION
declarations.
'$INCLUDE:'AutoBBS.BI' Module for BBS detection and
drop file handler.
'$INCLUDE:'EasyPara.BI' Configurable Easy-Door
parameters.
Init Para$(), NPara(), 0, 0, 0 Easy-Door initialization
routine.
Your own door code.
ReturnBBS The exit routine.
Please check the file EASYDEMO.BAS for a practical example of the
structure of an Easy-Door program.
The Easy-Door Library V2.60 /8
Configurable parameters
-----------------------
Easy-Door is completely configurable. For example, you can
translate all messages to another language easily. The file that
contains all parameters is EASYPARA.BI. It contains two sections:
string parameters and numeric parameters.
String configurable parameters:
-------------------------------
Parameter Description/Value
--------- -----------------
Para$(1) "Chat mode entered"
Para$(2) "ESC to end chat mode"
Para$(3) "Hello this is the Sysop."
Para$(4) (Sysop chat text color)
Para$(5) (User chat text color)
Para$(6) "Sysop chat mode ended"
Para$(7) "Warning - User inactivity time-out in 30
seconds"
Para$(8) "User inactivity time-out, Hanging Up..."
Para$(9) "ERROR: " (Displayed when there's an error)
Para$(10) "Press S to stop or P to pause"
Para$(11) "Press P to pause"
Para$(12) "P" (Pause key)
Para$(13) "S" (Stop key)
Para$(14) "Hanging Up..."
Para$(15) "No Carrier, Communication Lost"
Para$(16) "Data file not found."
Para$(17) "Returning to BBS..."
Para$(18) "Exceeded"
Para$(19) "Time Limit Exceeded. Call Back Tomorrow"
Para$(20) "More Y/N?"
Para$(21) "Y" (Yes key for more)
Para$(22) "N" (No key for more)
Para$(23) (Message displayed after a more prompt)
Para$(24) (Message to appear on status bar)
Para$(25) "Paused" (When PauseClock is activated)
Para$(26) "The Sysop has shelled to DOS..."
Para$(27) "DOS Shell: Type <EXIT> to Return to DOOR"
Para$(28) "The Sysop has returned from DOS"
Para$(29) "Warning: Less than 2 min. remaining this
call"
Para$(30) FullName$ |
Para$(31) Location$ |
Para$(32) Baud$ | Information that were
Para$(33) Com$ | read in the AUTOBBS.BI
Para$(34) AnsiFlag$ | module.
The Easy-Door Library V2.60 /9
Para$(35) TimeRemaining$ |
Para$(36) "Local Mode" (Message when in local mode)
Para$(37) "min." (On status bar)
Numeric configurable parameters:
--------------------------------
Parameter Description
--------- -----------
NPara(1) Delay to lower DTR when hanging up in
18th/sec
NPara(2) Pause delay when 'P' hit sec.
NPara(3) User Inactivity Time-out in sec.
NPara(4) Delay after a no carrier in 18th/sec
NPara(5) Delay when DATA FILE NOT FOUND in 18th/sec
NPara(6) NB of line in user's window
NPara(7) Carrier Detect On/Off)
NPara(8) Status bar color number. (Back * 16 + Fore)
NPara(9) Enables time counter
Npara(10) Used internally for storing time
NPara(11) Row where to put cursor when shelling to DOS
NPara(12) Enables ALT-X or ALT-R to force exit
NPara(13) Enables warning before daily time-out,
0= Off, or number of sec. for On)
NPara(14) Enables keys to change time
Npara(15) Used internally by inactivity checker)
NPara(16) Disables chat mode (0=Turn off, 1=Turn on
NPara(17) Enable Status Bar
NPara(18) Column where BAUD/LOCALLY is displayed on
status bar
EASYANSI.BI Module
------------------
The file EASYANSI.BI is now obsolete and is only included to
keep compatibility with version 2.0 of Easy-Door. Instead, to use
colors, you should use the SmartColor routine (which is more
efficient and supports Avatar/0+ color code).
The Easy-Door Library V2.60 /10
AUTOBBS.BI Module
-----------------
AutoBBS.BI is a module that reads the command line, interprets it
and calls the BBS drop file reader module that correspond to the
BBS program used. The command line must contain the name of the
door definition file used. For example, if DORINFO1.DEF is passed
on the command line, the QBBS/RA/RBBS module will be called
automatically. If the command line is empty, the door will
automatically be executed in local mode. Advanced users may add
new type of BBS to Easy-Door by adding drop file reader module.
Easy-Door function keys
-----------------------
Different function keys can be used in an Easy-Door program. The
table bellows list them.
Alt H : Hangs Up
Alt X : Returns to the BBS without hanging up
Alt C : Enters Chat Mode
Alt J : Jumps to DOS (DOS Shell)
Alt - : Adds one minute to time remaining
Alt - : Subtracts one minute to time remaining
The Easy-Door Library V2.60 /11
Easy-Door SUB and FUNCTION
--------------------------
AddSlash$ (FilePath$)
---------------------
Type: FUNCTION
Adds a backslash to the filename if there is not one already.
Very useful for processing configuration file.
E.g.: C:\QBBS ------> C:\QBBS\
C:\QBASIC\ ------> C:\QBASIC\
AnsiBox X1%, Y1%, X2%, Y2%, Frame%, Shadow%
-------------------------------------------
Type: SUB
This routine is used to make a box on the screen. X1% and Y1% is
the the upper left corner and X2%, Y2% is the bottom right corner
of the box. Frame% is used to select the type of border. The
Shadow% parameter is either one or zero. A value of one will add
a 3D look to the box by adding a simple shadow. You must be sure
that the user has ANSI or AVATAR when using this routine.
Frame% Horiz. Vert.
value border border
------ ------ ------
1 Single Single
2 Double Single
3 Single Double
4 Double Double
AnsiLocate Y%, X%
-----------------
Type: SUB
This routine is used to move the cursor at a specified screen
position. The Y% parameter is the row number (1-24) and the X%
parameter is the column number (1-80). This routine only works if
the user has ANSI or AVATAR/0+ capabilities.
The Easy-Door Library V2.60 /12
AnsiPrint Text$
---------------
Type: SUB
Prints a string on screen only. It prints at the current cursor
position and scrolls the screen automatically to not overwrite
the status bar. ANSI and Avatar/0+ sequences are supported.
E.g.: AnsiPrint "This line is not sent to remote screen."
BackSpace Number%
-----------------
Type: SUB
Sends a specified number of destructive backspace to modem and
screen.
E.g.: BackSpace 6 ' Sends 6 backspace
Bell State%
-----------
Type: SUB
Turns the SendBell routine on or off (on=1, off=0). When turned
off, no bell signal is sent to the remote computer.
E.g.: Bell 1 ' Turns on bell signal
Carrier State%
--------------
Type: SUB
Turns the automatic carrier detection on or off. (on=1, off=0)
E.g.: Carrier 0 ' Carrier detection is now Off
CarrierLost%
------------
Type: FUNCTION
Returns a non-zero value if the carrier is lost.
The Easy-Door Library V2.60 /13
Cap$ (Text$)
-----------
Type: FUNCTION
Capitalizes a string. Very handy for processing names. It adds a
professional touch to your doors.
E.g.: User$= "JOHN-OLIVER SMITH"
User$= Cap$(User$)
'The new content of Users$ will be "John-Oliver Smith"
CC$(Foreground%, Background%)
-----------------------------
Type: FUNCTION
This function acts like the SmartColor routine. But it is more
convenient to use this routine than SmartColor for readability
purpose.
Eg.: SendCR CC$(15,0) + "Welcome to " + CC$(14,1) + "Easy-Door"
Center$ (Text$)
--------------
Type: FUNCTION
Centers a string on the screen. This function does not actually
send something on output. You must use it in conjunction with
output routines like SendCR.
E.g.: SendCR Center$("Returning to BBS.")
ChangeDTR State%
----------------
Type: SUB
Changes the Data Terminal Ready (DTR) status on the active serial
port. A value of 1 will raise the DTR, and a 0 will lower it.
Lowering the DTR for a small period of time will force the modem
to hang-up.
E.g.: ChangeDTR 0 ' Puts the DTR low
ChangeDTR 1 ' Puts the DTR high
The Easy-Door Library V2.60 /14
ChangeNPara Num%, Value%
------------------------
Type: SUB
Changes a numeric configuration parameter to a specified value
when the door is running. Num% is the number of the parameter to
change. See the "Numeric configurable parameters" section for
more information about numeric parameters.
E.g.: ChangeNPara 3, 60 ' Inactivity time-out is now 60 sec.
ChangePara Num%, Value$
-----------------------
Type: SUB
Changes a string configuration parameter to a specified value
when the door is running. Num% is the number of the parameter to
change. See the "String configurable parameters" section for more
information about string parameters.
E.g.: ChangePara 25, "Stopped" ' Pause clock message
ChangeTime NewTime%
-------------------
Type: SUB
Changes the time that the user has left. NewTime% must contain
the new desired time in minutes. This routine only changes the
time available in the door. You should not use this routine if
you do not know what problems this routine can cause.
E.g.: ChangeTime 60 ' The user has now 60 minutes left
ChatMode
--------
Type: SUB
Activates the chat mode. Each line is automatically wrapped and
if the user has ANSI or Avatar/0+ the chat mode will use
different color for Sysop and user text. To exit chat mode, the
Sysop must press the Escape key.
E.g.: ChatMode ' Chat mode is now activated
The Easy-Door Library V2.60 /15
CheapSend Text$
---------------
Type: SUB
Sends a string without checking the carrier, the time limit or
other special things. Used internally by Easy-Door.
CheckCD
-------
Type: SUB
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 the BBS or to DOS. This routine is
not usually used because Easy-Door performs an automatic carrier
detection each time input/output is made. But it can be used if
modem routine are not used for a long period of time (in a loop
for example).
E.g.: CheckCD ' Forces Easy-Door to check for carrier
CheckIB%
--------
Type: FUNCTION
Checks the input buffer. This function will return a non-zero
value if there are characters in the input buffer.
E.g.: IF CheckIB% = 0 THEN
SendCR "Input buffer empty"
ELSE
SendCR "Input buffer contains characters"
END IF
CheckInac
---------
Type: SUB
Loops until there is a character in the buffer and checks for an
inactivity time-out. This routine will return control when
characters are present into modem or keyboard buffer. Used
internally by Easy-Door.
The Easy-Door Library V2.60 /16
CheckOB%
--------
Type: FUNCTION
Checks if the modem output buffer is full. The function will
return a non-zero value if full.
E.g.: CheckOB State% ' 0= Empty, others= Full
EasyMenu Title$, Choices$(), NbChoice%, Selection%, TextColor%
BorderColor%, Background%, StartingLine%, Frame%, Shadow%
-----------------------------------------------------------------
Type: SUB
This routine draws a menu on the screen and let the user choose
from a list of choices using the arrows keys. Title$ is the title
of the menu. Choice$() is the array that contains the possible
choices. Selection% is the variable that will hold the number of
the selection. TextColor% is the foreground color for text.
BorderColor% is the color of the frame. Background% is the
background color of the menu. Starting line is the starting
position of the menu. Frame% is the type of the border (see table
below). Finally, if Shadow% is equal to 1 there will be a drop
shadow added to the menu.
Frame% Horiz. Vert.
value border border
------ ------ ------
1 Single Single
2 Double Single
3 Single Double
4 Double Double
EndError (ErrorMessage$)
------------------------
Type: SUB
Terminates a door properly by printing a specified error message.
You should never terminate your doors with the END statement.
Using END may lockup the computer. Instead, use the EndError or
the ReturnBBS routine.
E.g.: EndError "No configuration file was found"
The Easy-Door Library V2.60 /17
EraseStatusBar
--------------
Type: SUB
Updates the status bar. Used internally by Easy-Door.
ExePath$
--------
Type: FUNCTION
Returns the full path of the program. In other words, this
function gives the exact location of the .EXE files currently
running. It is very useful for processing configuration files.
GetChar$
--------
Type: FUNCTION
Returns either a string containing a character read from the
modem/keyboard buffer or an empty string ("") if no character is
pending. This routine is similar to the QuickBasic INKEY$
statement but reads characters from keyboard and modem. The
special keys Home, End, Down, Left and Right are supported and
will return the following values (the same has QuickBasic):
Key Value returned
--- --------------
Home CHR$(0) + CHR$(71)
End CHR$(0) + CHR$(79)
Up CHR$(0) + CHR$(72)
Down CHR$(0) + CHR$(80)
Right CHR$(0) + CHR$(77)
Left CHR$(0) + CHR$(75)
E.g.: K$ = GetChar$
IF K$ = CHR$(0) + CHR$(72) THEN
SendCR "You pressed the UP key!"
END IF
GetString$ (Length%)
--------------------
Type: FUNCTION
Returns either a string containing a specified number of
characters read from the modem/keyboard buffer or an empty string
("") if no character is pending. This is an advanced function
very usefull in graphical terminal or others interactive
protocol.
The Easy-Door Library V2.60 /18
GetUserGraphType%
-----------------
Type: FUNCTION
Returns the graphic capabilities of the user.
Value Description
----- ------------
0 User has only ASCII capabilities
1 User has ANSI capabilities
2 User has AVATAR/O+ capabilties
E.g.: GraphType = GetUserGraphType%
IF GraphType < 1 THEN
SendCR "Sorry, ASCII doesn't work with this door."
END IF
Parser (Line$, Elements$(), MaxElements%, Delimitor$)
----------------------------------------------------
Type: SUB
Parses the elements in Line$. Elements$ is the destination array
used to store the parsed elements. MaxElements% is the maximum
number of elements you want. Delimitor$ is the character user to
separate each elements.
E.g.: Line$ = "house,dog,cat,school,computer"
DIM Elements$(1 TO 5)
Parser Line$, Elements$(), 5, ","
HangUp
------
Type: SUB
Disconnects the user by hanging up the modem. This will also exit
to the BBS.
E.g.: HangUp ' Disconnects the user on-line
HotKeys State%
--------------
Type: SUB
Turns hot keys on or off (on=1, off=0). See the "Technical
information about Easy-Door" section for more information about
hot keys.
E.g.: HotKeys 0 ' Turns off hot keys
The Easy-Door Library V2.60 /19
Init Para$(), NPara%(), DriverType%, HandShake%, IRQ%
-----------------------------------------------------
Type: SUB
The Init routine is the most important of all. It performs
initialization to the modem, sets up different parameters and
more. You must call Init before any other routines. If you omit
this, your program will not work at all. Para$() and NPara%() are
the two arrays that contain the configurable messages and values
(see the file EasyPara.BI). See table below for explanation of
other parameters.
When built-in modem routines are used, you can optionally specify
a type of handshaking. Also, you can select a non-standard port
IRQ if you want. Please note that Easy-Door will open the
communication port at the current baud rate. This is the easiest
and safest way and it provides support for high speed modems with
locked baud rates. Please note that Easy-Door has no maximum baud
rate value.
DriverType% Description
----------- ------------
0 Uses a FOSSIL driver if present. If not use
built-in communication routines.
1 Forces the use of built-in communication
routines.
HandShake% Description
---------- -----------
0 No handshaking
1 Uses XON/XOFF (software) handshaking
2 Uses CTS/RTS (hardware) handshaking
3 Uses both XON/XOFF and CTS/RTS handshaking
IRQ% Description
---- -----------
0 Uses the default IRQ value
1-15 Uses a specific IRQ value
E.g.: Init Para$(), NPara%(), 0, 2, 0
This will initialize Easy -Door in fossil driver
auto-detection mode with CTS/RTS handshaking enabled. The
default IRQ for this communication port will be used.
The Easy-Door Library V2.60 /20
ExitKey State%
--------------
Type: SUB
Turns the quick exit keys on or off (on=1, off=0). Setting
ExitKey to off will prevent the SYSOP from exiting the door with
ALT-X or ALT-R.
E.g.: KeyExit 0 ' ALT-R/X is now off
FileExist% (Filename$)
----------------------
Type: FUNCTION
This function is used to check the presence of a file on the
disk. The function will return -1 for a file that exists and 0 if
the file is not found.
E.g.: IF FileExist("C:\PLAYERS.DAT") THEN
SendCR "Okay."
ELSE
SendCR "The game data file does'nt exist."
END IF
LineFeed NumberOfLF%
--------------------
Type: SUB
Sends a specified number of linefeed (a change of line) to screen
and modem.
E.g.: LineFeed 5 ' We're now five lines down
The Easy-Door Library V2.60 /21
MaskInput Mask$, Answer$
------------------------
Inputs a string from the modem or the keyboard using an input
mask. For example, MaskInput could be use when asking phone
numbers. Mask$ is the a string that conatains the desired input
mask.
Character Valid input
--------- -----------
9 0 - 9
a a - z, A - Z
A a - z, A - Z (Converted to uppercase)
x all
X all (Converted to uppercase)
E.g.: MaskInput "(999) 999-9999", Phone$
SendCR "Your phone numnber is " + Phone$
ModemInput Message$, Answer$, BoxForeCol%, BoxBackCol%, MaxLen%
---------------------------------------------------------------
Type: SUB
Inputs a string from the modem or the keyboard. You have to
specify the maximum length of the string. If MaxLen% is a
negative number, the answer will be in upper case. If you don't
want a prompt, use an empty string ("") for Message$.
BoxForeColor% and BoxBackColor% are the colors of the box that
will contain the answer.
E.g.: ModemInput (Your age: ", 14, 1, Age$, 2)
ModemInputChar$
--------------
Type: FUNCTION
Inputs a character from the modem or the keyboard. This routine
will wait for one character and returns control to the program
thereafter.
E.g.: K$ = ModemInputChar$
SendCR "You just pressed this key: " + K$
The Easy-Door Library V2.60 /22
ModemOnlySend Text$
-------------------
Type: SUB
Sends a string of characters to the modem only, not to the
screen. No linefeed is added.
MulChoice Choice$, Default%, Answer%
------------------------------------
Type: SUB
This routine is used to get an answer from a multiple choice
input. The user can toggle between available answers by using
arrow's keys or by pressing space. Default% is the the number of
the start up choice. Answer% will contain the number
corresponding to the choice made by the user. Choice$ is a string
containing all possible choices separated by a semicolon. ANSI or
Avatar/0+ is required for this routine.
E.g.: Send "Would you like to join this game? "
MulChoice "Yes;No;Quit", 2, Answer%
NoCarrier
---------
Type: SUB
Called internally by Easy-Door when there's no carrier.
NotFound
--------
Type: SUB
Displays a message warning the user that a file was not found.
NovellDetect%
-------------
Type: FUNCTON
Return -1 if the program is running under Novell Netware.
The Easy-Door Library V2.60 /23
Num2Str$ (IntValue%)
-------------------
Type: FUNCTION
Converts an integer number to a string like BASIC STR$ function
but does not add the spaces at the beginning/ending of the
string. Useful for sending number with SendCR.
E.g.: Year% = 1998
SendCR "The year is " + Num2Str$(Year%)
PauseClock
----------
Type: SUB
Pauses the time left clock. Please note that the built-in
computer's clock is not altered in any way.
PurgeInBuffer
-------------
Type: SUB
Clears all the pending characters in the modem and keyboard input
buffer.
E.g.: PurgeInBuffer
PurgeOutBuffer
--------------
Type: SUB
Clears all the characters in the output buffer not already
transmitted.
E.g.: PurgeOutBuffer
QB2TP$ (String$)
----------------
Type: FUNCTION
This function will return a PASCAL string from a BASIC string.
PASCAL uses the first character of a string has a length
indicator. Very useful when processing BBS files made with
PASCAL.
The Easy-Door Library V2.60 /24
ResetColor
----------
Type: SUB
This routine will set the current color to the default white on
black. Easy-Door automatically calls this routine when the door
is closed.
ResumeClock
-----------
Type: SUB
Restarts the time left clock paused by the PauseClock routine.
ReturnBBS
---------
Type: SUB
You must use this routine to return to the BBS. Do not use the
normal END statement; otherwise the computer will crash. This
routine will also display a message on the status bar to announce
the return to the BBS.
E.g.: ReturnBBS ' Exit the door and return to the BBS
RIPDetect%
----------
Type: FUNCTION
Checks if the remote terminal has RIP capabilities. The function
will return a non-zero value if RIP (Remote Imaging Protocol) is
supported. Use the SendRIP routine to send a RIP screen to the
remote computer.
E.g.: IF RIPDetect% <> 0 THEN
SendCR "RIP available"
ELSE
SendCR "RIP not available"
END IF
The Easy-Door Library V2.60 /25
SafeASC% (Char$)
----------------
Type: FUNCTION
This function is the same as the BASIC ASC() function except it
does not produces an error when the string is null. In this case,
it will return the value zero.
Send Text$
----------
Type: SUB
Sends a string of characters to the modem and to the screen. No
linefeed is added. This routine supports ANSI and Avatar/0+
control sequence.
E.g.: Send "Welcome to this door!"
SendBell
--------
Type: SUB
Sends a bell signal if the bell is turned on. The bell is heard
only on the remote computer, not on the Sysop side.
E.g.: SendBell ' This will send a bell signal (ASCII #7)
SendCLS
-------
Type: SUB
Clears the screen on local and remote screen. Please note that
the status bar is not erased.
E.g.: SendCLS ' The screen is now empty
SendCR Text$
------------
Type: SUB
Sends a string of characters to the modem and to the screen. A
linefeed is automatically added. This routine supports ANSI and
Avatar/0+ control sequence.
E.g.: SendCR "One moment please..."
The Easy-Door Library V2.60 /26
SendFile FileName$, TypeNumber%
-------------------------------
Type: SUB
Displays a text file. This routine does not make a pause when the
screen is full. Uses the SendTXT routine if you want that
feature.
TypeNumber% Function(s) available
----------- ---------------------
0 Pause and stop
1 Pause only
E.g.: SendFile "EasyDoor.DOC", 0 ' Pause & Stop enabled
SendLeft Number%
----------------
Type: SUB
Moves the cursor to the left a specified number of times. Only
available if user has ANSI or Avatar/0+.
SendMenu FileName$, KeyList$, Key$, TypeNumber%
-----------------------------------------------
Type: SUB
Sends a menu file. During the transmission, the user may press a
key in the KeyList$. 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 capabilities. If a .ANS
file is not available, Easy-Door will use an .ASC file instead.
TypeNumber% Description
----------- ----------
0 Waits for a key if none is pressed during
transmission of the menu. A normal menu.
1 Does not wait for a key if none are pressed
during transmisson of the menu. Not often
used.
E.g.: SendMenu "MainMenu", "DUQ", K$, 0
'This will transmit the file MENU.ASC or MENU.ANS and will
'wait for D, U or Q
The Easy-Door Library V2.60 /27
SendMenuString Text$, KeyList$, Key$, TypeNumber%
-------------------------------------------------
Type: SUB
Sends a string of characters and checks if a key was pressed
during the transmission. If there was no key pressed when the
string was sent, Easy-Door will wait for one in the KeyList$
(except if TypeNumber% = 2). You may customize the pause and stop
keys with the configurable parameters (see EASYPARA.BI).
TypeNumber% Description
----------- -----------
0 Waits for a key if no key was pressed during
transmission of the string.
1 Does not wait for a key when none are
pressed during transmission of the string.
2 Does not use the KeyList$, but enables stop
and pause when transmitting string. Not
often used.
E.g.: S$ = "[R]eturn to main menu, [Q]uit this DOOR"
SendString S$, "RQ", K$, 0
SendCR "The user has pressed: "+ K$
SendRight Number%
----------------
Type: SUB
Moves the cursor to the right a specified number of times. Only
available if user has ANSI or Avatar/0+.
SendRIP FileName$
-----------------
Type: SUB
Send a RIP file. The RIP screen is only visible on the remote
system.
E.g.: SendRIP "RIPDEMO.RIP"
The Easy-Door Library V2.60 /28
SendTXT FileName$, TypeNumber%
------------------------------
Type: SUB
Sends a text file and prompts for more when the screen is full.
TypeNumber% Function(s) available
----------- ---------------------
0 Pause and Stop
1 Pause only
E.g.: SendTXT "EasyDoor.DOC", 0
SmartColor ForeColor%, BackColor%
---------------------------------
Type: SUB
This routine changes the active text color. ForeColor% (0-15) is
used to specify the text color and BackColor% (0-7) is for the
background color. This routine is named SmartColor because of its
nature. This routine only send the necessary control sequence to
change the color by analysing the current active color.
Automatically uses ANSI or Avatar depending of the user's
configuration.
E.g.: SmartColor 15, 1 ' Bright white text on a blue background
StatusPrint Text$
-----------------
Type: SUB
Prints a string on the status bar. The string is automatically
centered.
TimeKeys (State%)
-----------------
Type: SUB
Turns the keys to change time on or off (On=1, Off=0). Those keys
are (ALT -) and (ALT =).
The Easy-Door Library V2.60 /29
TimeLeft%
---------
Type: FUNCTION
Returns the time left by the user. The value returned is in
minutes.
E.g.: SendCR Num2Str$(TimeLeft%) + " minutes remaining."
TimeOut (Minute%)
-----------------
Type: SUB
Changes the inactivity time-out delay (in minute).
E.g.:TimeOut 4 ' Sets the inactivity time-out to 4 minutes
TP2QB$ (String$)
----------------
Type: FUNCTION
This function will return a BASIC string from a PASCAL string.
PASCAL uses the first character of a string has a length
indicator. Very useful when processing BBS files made with
PASCAL.
WaitOB
------
Type: SUB
Loops until the modem output buffer becomes empty.
The Easy-Door Library V2.60 /30
Note from the author
--------------------
Thank you for using the Easy-Door library. It is to be hoped that
Easy-Door will be as useful to you as it is to us. Since
Easy-Door is so easy to use and powerful, you might find yourself
writing your own door and putting it on the shareware market.
Registration is, therefore, a good idea. Please register today!
Special thanks
---------------
Andre Morin, Nicolas Saillant, Ken Bienvenue, Mike Welch, Wig
DeMoville, Eric Yung, Gary Peterson, Jerry Aldrich, Dave
Wendling, all registered users and everybody who helped me in
this project.
How to contact us?
------------------
- Easy-Door support BBS
Node 1: (418) 658-6769 (14.4 kbps, V.32 bis)
Node 2: (418) 659-6120 (14.4 kbps, V.32 bis)
For a fast access, logon with the name "Easy-Door"
with the password "Easy-Door".
- by Fidonet at 1:240/291
File Request (FREQ) EASYDOOR to get the latest
shareware version of Easy-Door.
- Fidonet QuickBasic and Visual Basic Echo Mail Conference
- Regular mail
Martin Bouchard
1207 du Golf
Cap-Rouge, QC
CANADA
G1Y 2T4