home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / easydr26.zip / EDRDEMO.BAS < prev    next >
BASIC Source File  |  1994-11-13  |  5KB  |  177 lines

  1. DEFINT A-Z
  2.  
  3. ' $INCLUDE: 'EasyDoor.BI'
  4. ' $INCLUDE: 'AutoBBS.BI'
  5. ' $INCLUDE: 'EasyPara.BI'
  6.  
  7. ON ERROR GOTO EndError
  8.  
  9. ON UEVENT GOSUB EndRoutine
  10. UEVENT ON
  11.  
  12. Init Para$(), NPara(), 0, 2, 0  ' Use those default parameters
  13. LOCATE , , 1
  14.  
  15. IF GetUserGraphType = 0 THEN
  16.    SendCLS
  17.    SendCR "Sorry, you need ANSI or AVATAR capabilities to run this door."
  18.    WHILE ModemInputChar$ <> CHR$(13): WEND
  19.    ReturnBBS
  20. END IF
  21.  
  22. SendCLS
  23. SmartColor 15, 1
  24. SendCR Center$("This is the SmartColor and the AnsiLocate routine...")
  25. RANDOMIZE TIMER
  26. FOR T = 1 TO 200
  27.    SmartColor T MOD 15 + 1, T MOD 100 + 1
  28.    AnsiLocate RND * 19 + 3, RND * 65 + 1
  29.    Send "* Easy-Door *"
  30. NEXT
  31.  
  32. SmartColor 11, 3
  33. AnsiBox 20, 10, 60, 15, 2, 1
  34. SmartColor 15, 3
  35. AnsiLocate 11, 22: SendCR "You can use the AnsiBox routine to"
  36. AnsiLocate 12, 22: SendCR "make pretty box like this one!"
  37. AnsiLocate 14, 32: Send "Press [Enter] to continue."
  38. WHILE ModemInputChar$ <> CHR$(13): WEND
  39.  
  40. SmartColor 15, 5
  41. AnsiBox 18, 9, 62, 15, 2, 1
  42. SmartColor 15, 5
  43. AnsiLocate 10, 20: SendCR "Easy-Door has nice simple menu routines."
  44. AnsiLocate 11, 20: SendCR "It also has built-in support for ANSI and"
  45. AnsiLocate 12, 20: SendCR "Avatar/0+ control codes."
  46. AnsiLocate 14, 34: Send "Press [Enter] to continue."
  47. WHILE ModemInputChar$ <> CHR$(13): WEND
  48.  
  49.  
  50. SendCLS
  51. SmartColor 15, 0
  52. SendCR "The SendFile routine let you send ANSI or AVATAR files."
  53. Linefeed 2
  54. SmartColor 3, 0
  55. SendCR "Use cursor keys or press space to toggle between choice. Press Enter to select."
  56. SendCR ""
  57. SmartColor 14, 0
  58. Send "Wich file type you want to see: "
  59. MulChoice "ANSI;Avatar/0+;Skip this part", 1, ch
  60. SELECT CASE ch
  61.    CASE IS = 1: SendFile "SHUTTLE2.ANS", 0
  62.    CASE IS = 2: SendFile "SHUTTLE2.AVT", 0
  63. END SELECT
  64.  
  65. SmartColor 11, 3
  66. AnsiBox 18, 10, 58, 14, 4, 0
  67. SmartColor 15, 3
  68. AnsiLocate 11, 20: SendCR "Who said BASIC was slow?"
  69. AnsiLocate 13, 30: Send "Press [Enter] to continue."
  70. WHILE ModemInputChar$ <> CHR$(13): WEND
  71.  
  72. SendCLS
  73. SmartColor 15, 0
  74. SendCR ""
  75. Send "Now look at the first line of the status bar and then press [Enter]."
  76. WHILE ModemInputChar$ <> CHR$(13): WEND
  77.  
  78. ChangePara 24, " This bar can contain your own specific message!"
  79. StatusBar 1
  80. Linefeed 2
  81. SendCR "Now look at it again."
  82. SmartColor 9, 0
  83. SendCR ""
  84. SendCR "Has you can see Easy-Door is fully customizable."
  85. SendCR ""
  86. SmartColor 3, 0
  87. SendCR "Easy-Door can also be translated to another language like French or Spanish"
  88. SendCR "without pain."
  89. SendCR ""
  90. SmartColor 14, 0
  91. Send "Press [Enter] to continue."
  92. WHILE ModemInputChar$ <> CHR$(13): WEND
  93.  
  94. Choice$(1) = "Start a new game"
  95. Choice$(2) = "Continue a game"
  96. Choice$(3) = "Display high scores"
  97. Choice$(4) = "Quit"
  98.  
  99. SendCLS
  100. NBChoice = 4
  101. EasyMenu "Main menu", Choice$(), NBChoice, Answer, 15, 14, 1, 5, 2, 1
  102.  
  103. AnsiLocate 16, 1
  104. SmartColor 15, 0
  105. SendCR "You have selected option #" + Num2Str$(Answer)
  106. SendCR ""
  107. SmartColor 14, 0
  108. Send "Press [Enter] to continue."
  109. WHILE ModemInputChar$ <> CHR$(13): WEND
  110.  
  111. SendCLS
  112. SmartColor 15, 0
  113. SendCR "Easy-Door supports various multitaskers:"
  114. SmartColor 3, 0
  115. SendCR "   - Windows"
  116. SendCR "   - OS/2"
  117. SendCR "   - DESQview"
  118. SendCR "   - DoubleDOS"
  119. SendCR "   - PC-MOS"
  120. SendCR ""
  121. SmartColor 15, 0
  122. SendCR "With the Easy-Door library your application will have:"
  123. SmartColor 3, 0
  124. SendCR "   - Automatic time slicing"
  125. SendCR "   - DESQview virtual screen support"
  126. SendCR ""
  127. SmartColor 11, 0
  128. Send " ■ Your system is running under "
  129.  
  130. SELECT CASE TaskerDetect%
  131.    CASE IS = 1: SendCR "Windows."
  132.    CASE IS = 2: SendCR "DESQview or TopView."
  133.    CASE IS = 3: SendCR "DoubleDOS."
  134.    CASE IS = 4: SendCR "PC-MOS."
  135.    CASE IS = 5: SendCR "OS/2."
  136.    CASE ELSE: SendCR "DOS or an unknown operating system."
  137. END SELECT
  138.  
  139. SendCR ""
  140. SmartColor 14, 0
  141. Send "Press [Enter] to continue."
  142. WHILE ModemInputChar$ <> CHR$(13): WEND
  143.  
  144. Here:
  145. lf$ = CHR$(13) + CHR$(10)
  146. SmartColor 15, 1
  147. AnsiBox 7, 3, 72, 16, 2, 0
  148. AnsiLocate 5, 1
  149. SmartColor 14, 1
  150. SendCR Center$("Thanks for watching the Easy-Door Library demo")
  151. SmartColor 15, 1
  152. SendCR Center$("(c) 1990-93, All Rights Reserved") + lf$
  153. SendCR Center$("by Martin Bouchard (Fidonet 1:240/291)") + lf$
  154. SendCR Center$("1207 du Golf")
  155. SendCR Center$("Cap-Rouge, QC")
  156. SendCR Center$("Canada")
  157. SendCR Center$("G1Y 2T4")
  158. SendCR lf$ + lf$ + lf$
  159. SmartColor 14, 0
  160. Send "Press [Enter] to continue."
  161. WHILE ModemInputChar$ <> CHR$(13): WEND
  162. SendCLS
  163. ReturnBBS
  164.  
  165. EndRoutine:
  166. CLS
  167. PRINT "Door terminated"
  168. RETURN
  169.  
  170. EndError:
  171. CLS
  172. PRINT "Runtime error #"; Num2Str$(ERR)
  173. PRINT
  174. SLEEP 2
  175. END
  176.  
  177.