home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
DS40.ZIP
/
SAMPLE.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-10-24
|
6KB
|
138 lines
' $INCLUDE: 'DOORSORC.INT'
PROGNAME$ = "Door Source Sampler"
RELEASE$ = "1.0"
CALL ClrScrn
CLOSE #1
' Some features that you might want to try now that you're on this
' side:
' F3 key - Toggles the printer toggle on/off (You'll see it on the status line)
' F5 key - Shells to DOS! (And saves/restores the screen)
' Try adding the command line parameter LOCAL, it will make Door Source
' run in a local mode (mainly meant for your own testing, not for regular
' use). Door Source will still read the configuration file, except now
' you don't have to have bbs interface file (because DS will ask you for
' a name and if you want ansi)
'
CALL Send("Door Source 4.0 has many new features and additions", No, Yes, 10)
CALL Send("To get the most out of this sampler, download a copy of it so", No, Yes, 10)
CALL Send("can see how the new features are implemented!", No, Yes, 10)
CALL NL(1)
CALL Send("This is a demo of the new prompt input routine. It works best with ANSI on.", No, Yes, 11)
Caps = Yes
CALL PromptIncomm("Would you like to continue", Default1, 15, 1, 14)
Caps = No
IF ARG$ <> "Y" THEN CALL ExitDoor
CALL NL(1)
CALL Send("This is a demo of the new entry prompt routine, it works well with any mode.", No, Yes, 11)
CALL EntryIncomm("What do you want your alias to be (25 chars max) :", 25, 12, 14)
CALL NL(1)
CALL Send("This is a demo of changing colors in mid-string without multiple calls.", No, Yes, 11)
' QSend is the same a Send except that it doesnt have the bell option or color option
CALL QSend("@X0ABlue@X0BGreen@X0CRed@X0DMagenta@X0EYellow@X0FWhite", Yes)
CALL NL(1)
CALL Send("This is a demo of the subsitution codes. (And that the Center routine will", No, Yes, 11)
CALL Send("correctly calculate the right position to center it to.)", No, Yes, 11)
WD$ = "Hello @FIRST@, today is @SYSDATE@."
CALL Center(WD$)
CALL Send(WD$, No, Yes, 13)
CALL NL(1)
CALL Send("Here are two demos, one of the protected input feature and the other", No, Yes, 11)
CALL Send("of the limited input feature.", No, Yes, 11)
Protected.Input$ = "*" ' Make a * appear instead of what is typed
CALL Incomm("What is your password?", No, No, 14)
Protected.Input$ = "" ' Disable the protected input
Table$ = "YN" ' Allow only Y and N keys (backspace, enter and such are still allowed)
CALL Incomm("You can only type Y and N, try it:", No, 1, 14)
Table$ = Default.Table$ ' Set back to normal
CALL NL(1)
CALL Send("The following will be a demo of the Windows routine in its NEW faster", No, Yes, 11)
CALL Send("format. Unfortunetly, Windows is now a ANSI only routine. It will also", No, Yes, 11)
CALL Send("show you the new WindowPrint and WindowInput routine, as well as the", No, Yes, 11)
CALL Send("new MenuManager routine that is more friendly and handles more selections", No, Yes, 11)
CALL QSend("@WAIT@", No) ' Prints a Press [Any Key] to continue and waits
BackGroundColor = 1
CALL ClrScrn
CALL Windows(10, 10, 20, 70, 15, 1, 3, Yes)
Row = 11
Col = 11
CALL WindowPrint("Hello there!", Row, Col, 14, 1)
Row = 12
Col = 11
CALL WindowInput("What is your name?", 25, Row, Col, 12, 1)
BackGroundColor = 0
CALL ClrScrn
DIM Menu$(11)
Menu$(1) = "1@X0C) @X0FFirst option"
Menu$(2) = "2@X0C) @X0FSecond option"
Menu$(3) = "3@X0C) @X0FThird option"
Menu$(4) = "4@X0C) @X0FFourth option"
Menu$(5) = "5@X0C) @X0FFifth option"
Menu$(6) = "6@X0C) @X0FSixth option"
Menu$(7) = "7@X0C) @X0FSeveth option"
Menu$(8) = "8@X0C) @X0FEighth option"
Menu$(9) = "9@X0C) @X0FNinth option"
Menu$(10) = "10@X0C)@X0FTenth option @X0B(@X0EBefore you could only have 9!@X0B)"
Menu$(11) = "11@X0C)@X0FEleventh option"
CALL MenuManager(Menu$(), Yes, 10, 11, 14, 0, 7, BarNum)
CALL Send("You picked " + STR$(BarNum), No, 2, 10)
' Notice that instead of a Yes as the third parameter, a number 2 was
' put in place it. This will cause Door Source to send 2 enters after
' printing the screen, so you don't have to have CALL NL(1) right after it
' if you want a blank line after the line you just sent.
DIM Blck$(6)
Blck$(1) = "@X0BThis output may @X0Cnot@X0B look like anything special."
Blck$(2) = "@X0FBut@X0B, it actually is! This is a example using the @X0Enew@X0B"
Blck$(3) = "@X0ABlockSend@X0B routine. You can pass it an array and it will"
Blck$(4) = "display it. Now you can easily @X0Fpre-program@X0C ENTIRE @X0B screens"
Blck$(5) = "right into your program. You can use ANSI codes or the substitution"
Blck$(6) = "codes too!"
CALL BlockSend(Blck$(), 6)
CALL NL(1)
CALL Send("This is a demo of the routine RainbowSend (by Daniel Sharpe)", No, Yes, 11)
CALL RainbowSend("You've just won 1 MILLION dollars (not really!)", No, Yes, 10)
CALL ExitDoor
' Of course there are lots of other features, but they can't all be shown
' in this program. Features such as routines to change DTR,CTS,and RTS
' status, a feature to stop a user from aborting a file being viewed with
' ViewFile, a feature to turn on/off carrier checking, a feature to
' that lets your program wrap itself up if the door has to expectedly end
' in case of loss of carrier or the sysop pressing F8, and the list goes
' on and on. To show you some numbers on how many changes have been done,
' here's two numbers:
' MAJOR changes (new routines, major changes to old): Over 35
' MINOR changes (new variables, optimization) : Over 150
' Now in the minor changes, it doesnt mean 150 new variables, it means
' 150 minor changes to Door Source that include new variables and lots of
' other things. In fact, more unnessicary variables were removed than new
' ones were added. Now most of Door Source is VERY structured, there are
' virtually no GOTOs or GOSUB inside Door Source itself, instead there
' are many IF...END IFs, WHILE...WENDs, DO...LOOPs instead. The actual
' This version makes Door Source the most complete, most advanced,
' and the fastest door library for QuickBasic.