home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / graphic / datashow / promote1.shw < prev    next >
Text File  |  1994-11-01  |  12KB  |  447 lines

  1. ;*********************************************************************;
  2. ; Scriptname.:  PROMOTE1.SHW                                          ;
  3. ; Date.......:  1st. Nov. 1994, by RMP DATA.                          ;
  4. ; Purpose....:  Promotion for DATASHOW v. 5.0A, as an example script. ;
  5. ;*********************************************************************;
  6.  
  7. ; Other files needed:
  8. ; -------------------
  9. ; sound1.shw, scroll1.shw                  ; Tight loop script files
  10. ; promote1.gra, chess.pcx, hugo1.gif       ; Graphic files
  11. ; mrnumo.fli                               ; Animation file
  12. ; entrance.snd                             ; DataShow Music file
  13. ; goodmorn.wav                             ; Wave Music file
  14. ; show1.scr - show8.scr                    ; Captured screen files
  15.  
  16. SET ESCAPEKEY 27                           ; Script can be stopped any time
  17. SET TIMEOUT 10                             ; Seconds to wait for keyboard
  18.  
  19. VARIABLE CREATE counttimes TYPE NUMBER 1   ; Counts number of runs
  20. IF counttimes NE 1 DO JUMPMARK skipsetup   ; Jump if not 1st run
  21.  
  22. VARIABLE CREATE screentype TYPE NUMBER 0   ; Used to determine video mode
  23. COLOR BACKGROUND 1
  24. SCREEN CLEAR
  25. DRAW BOX 79 24
  26.  
  27. ;Check the graphics adapter
  28. IF GRAPH VGA DO
  29.    MATH screentype = 3
  30. END
  31. IF GRAPH EGA DO
  32.    MATH screentype = 2
  33. END
  34. IF GRAPH CGA DO
  35.    MATH screentype = 1
  36. END
  37. IF screentype LE 1 DO
  38.    GOXY 3 2
  39.    WRITE "THIS PRESENTATION IS MADE FOR EGA/VGA SCREENS!"
  40.    GOXY 3 3
  41.    WRITE "IT CAN BE RUN ON YOUR SCREEN BUT SOME FEATURES ARE LIMITED..."
  42.    GOXY 3 4
  43.    WAIT "PUSH ANY KEY..."
  44. END
  45.  
  46. ;Check the sound capabilities
  47. VARIABLE CREATE soundtype TYPE NUMBER 5   ; Used to determine sound mode
  48. VARIABLE CREATE answer TYPE STRING ""     ; Used to get answer from user
  49. COLOR BACKGROUND 4
  50. GOXY 26 01 WRITE "< Setup for promotion script >"
  51. COLOR BACKGROUND 1
  52. GOXY 08 06
  53. WRITE "This presentation can include sampled sound capabilities. For this"
  54. GOXY 08 07
  55. WRITE "to work, you need a fast compatible computer and the means to play"
  56. GOXY 08 08
  57. WRITE "sampled sound."
  58. GOXY 22 11 WRITE "Select between one of these choises:"
  59. GOXY 26 13 WRITE "0 - No sound at all"
  60. GOXY 05 14 WRITE "->Select if unsure->"
  61. GOXY 26 14 WRITE "1 - No sampled sound"
  62. GOXY 26 15 WRITE "2 - Via PC Speaker"
  63. GOXY 26 16 WRITE "3 - Via ADLIB card"
  64. GOXY 26 17 WRITE "4 - Via Sound Blaster card"
  65. GOXY 22 19 WRITE "Choise:"
  66. MARK loopread1
  67. GOXY 30 19 READ STRING answer 1
  68. CASE STRING answer "0" DO MATH soundtype = 0
  69. CASE STRING answer "1" DO MATH soundtype = 1
  70. CASE STRING answer "2" DO MATH soundtype = 2
  71. CASE STRING answer "3" DO MATH soundtype = 3
  72. CASE STRING answer "4" DO MATH soundtype = 4
  73. IF soundtype EQ 5 DO JUMPMARK loopread1
  74.  
  75. ;IF SOUND ADLIB DO
  76. ;   MATH soundtype = 3                     ; sound type 3 = adlib
  77. ;END
  78. ;IF SOUND BLAST DO
  79. ;   MATH soundtype = 4                     ; sound type 4 = sound blaster
  80. ;END
  81. ;Set the sound capabilities for MUSIC PROCESS output
  82. IF soundtype EQ 3 DO
  83.    INSTALL SOUND ADLIB
  84. END
  85. IF soundtype EQ 4 DO
  86.    INSTALL SOUND BLAST
  87. END
  88.  
  89. MARK skipsetup                             ; Jump here if not 1st run
  90.  
  91. ;Make graphics at beginning of this script
  92. IF screentype GE 2 DO
  93.    SET GRAPHICS EGA1
  94. END
  95. IF screentype EQ 1 DO
  96.    SET GRAPHICS CGA
  97. END
  98.  
  99. COLOR ATTRIBUTE 31             ; Set to blue background, white foreground
  100. COLOR BACKGROUND 1             ; Set the background to blue
  101. COLOR FOREGROUND 15            ; Set the foreground to white
  102. SCREEN CLEAR
  103.  
  104. SET DELAYFACTOR 5
  105. SET SHADOW 4
  106.  
  107. GOXY 30 2 WRITE "Welcome to a presentation of"
  108.  
  109. EFFECT TEXTTYPE 3 6
  110. GOXY 26 3 WRITE "DataShow"
  111. EFFECT TEXTTYPE 0 1
  112.  
  113. GOXY 10 12 DRAW LINE 60
  114. GOXY 10 20 DRAW LINE 60
  115.  
  116. GOXY 1 14
  117.  
  118. IF soundtype NE 0 DO
  119.    SPEAK "W-E-L-L-K-U-M-E"
  120.    SPEAK "T-OO D-A-TH-A-S-H-U-W"
  121. END
  122.  
  123. DEFINE
  124. ///////    //////   ///////   //////    ///////  //    //  ///////  //  //  //
  125. //    //  //    //    //     //    //  //        //    //  //   //  //  //  //
  126. //    //  ////////    //     ////////  ////////  ////////  //   //  //  //  //
  127. //    //  //    //    //     //    //        //  //    //  //   //   // //  //
  128. ///////   //    //    //     //    //  ///////   //    //  ///////    //////
  129. END
  130.  
  131. SET DELAYFACTOR 0              ; Set waiting period to zero
  132.  
  133. MOTION LEFT 0                  ; Move defined area across screen
  134. MOTION RIGHT 79                ; Move defined area partly back on screen
  135.  
  136. EFFECT TEXTTYPE 1 6
  137. GOXY 30 20 WRITE "V. 5.0A"
  138. EFFECT TEXTTYPE 0 1
  139. WAIT 3
  140.  
  141. SET SHADOW OFF
  142. IF screentype NE 0 DO
  143.    SET GRAPHICS OFF
  144. END
  145. SET CURSOR OFF
  146.  
  147. SHOW SCREEN "show1.scr" TXT    ; Show screen saved with CAPTURE
  148.  
  149. IF soundtype NE 0 DO
  150.    MUSIC PROCESS "entrance.snd" SND
  151. ELSE
  152.    WAIT 2
  153. END
  154. WAIT 1
  155.  
  156. COLOR BACKGROUND 3             ; Set the background to cyan
  157. SCREEN CLEAR
  158.  
  159. GOXY 1 20
  160. WINDOW 79 4                    ; Set part of screen as window
  161. COLOR BACKGROUND 7
  162. SCREEN CLEAR                   ; Clear only the current window area
  163.  
  164. GOXY 1 1
  165. WINDOW 79 24                   ; Set back to all of the screen
  166.  
  167. COLOR ATTRIBUTE 63             ; Set to cyan background, white foreground
  168.  
  169. GOXY 6 2
  170. DRAW BOX 70 14
  171.  
  172. SET CURSOR ON
  173. SET DELAYFACTOR 5
  174.  
  175. GOXY 10 4
  176. WRITE "Together with the resident program CAPTURE, you can create pre-"
  177. GOXY 10 6
  178. WRITE "sentations fast and easy. You CAPTURE screens from programs and"
  179. GOXY 10 8
  180. WRITE "show them from DATASHOW like this screen to be shown here......"
  181. WAIT 2
  182.  
  183. SCREEN GET                     ; Save the current screen to a buffer
  184. SET CURSOR OFF
  185. SHOW SCREEN "show2.scr" TXT    ; Show screen saved with CAPTURE
  186. WAIT 2
  187. IF soundtype NE 0 DO
  188.    SPEAK "C-A-P-T-U-R-E"
  189.    WAIT 1
  190.    SPEAK "AE"
  191.    SPEAK "S-K-R-EE-EE-N"
  192. END
  193. WAIT 2
  194. SCREEN WIPE SPLIT
  195. SCREEN PUT                     ; Retrieve saved screen from the buffer
  196. SET CURSOR ON
  197.  
  198. GOXY 10 10
  199. WRITE "It is a simple task  to create scripts  and have them  shown on"
  200. GOXY 10 12
  201. WRITE "the screen  with  incredible flexibility.  Scripts are ordinary"
  202. GOXY 10 14
  203. WRITE "ASCII files.  Here the easy method to make scripts is shown..."
  204.  
  205. IF soundtype NE 0 DO
  206.    SPEAK "P-U-S-H"
  207.    WAIT 1
  208.    SPEAK "A-N-I"
  209.    WAIT 1
  210.    SPEAK "K-E-I"
  211. END
  212.  
  213. GOXY 10 20
  214. WAIT "Push any key"            ; Wait for any key to be pushed or TIMEOUT
  215.  
  216. SET CURSOR OFF
  217. COLOR ATTRIBUTE 0
  218.  
  219. SHOW SCREEN "show3.scr" TXT    ; Show screen saved with CAPTURE
  220. WAIT 4
  221. SHOW SCREEN "show4.scr" TXT    ; Show screen saved with CAPTURE
  222. WAIT 4
  223. SHOW SCREEN "show5.scr" TXT    ; Show screen saved with CAPTURE
  224. WAIT 4
  225. EFFECT GLITTER
  226. WAIT 1
  227.  
  228. SCREEN CLEAR
  229. GOXY 10 4
  230. WRITE "It is also a simple task to create several slides and have them"
  231. GOXY 10 6
  232. WRITE "shown on the screen with incredible flexibility and control."
  233. GOXY 10 9
  234. WRITE "Here the easy method to make slides is shown..."
  235. WAIT 3
  236.  
  237. SHOW SCREEN "show6.scr" TXT    ; Show screen saved with CAPTURE
  238. WAIT 4
  239.  
  240. IF soundtype NE 0 DO
  241.    SET TEXTSOUND ON
  242. END
  243. COLOR BACKGROUND 4             ; Set the background to red
  244. SCREEN CLEAR
  245. GOXY 10 4
  246. WRITE "You can also write your scripts, slides or graphics to a printer!"
  247. WAIT 3
  248.  
  249. SHOW SCREEN "show7.scr" TXT    ; Show screen saved with CAPTURE
  250. WAIT 2
  251.  
  252. COLOR BACKGROUND 3             ; Set the background to cyan
  253. GOXY 13 5 WRITE "PROMOTE1.SHW"
  254. WAIT 3
  255.  
  256. COLOR ATTRIBUTE 63
  257. SET TEXTSOUND OFF
  258. SET DELAYFACTOR 0
  259.  
  260. SCREEN CLEAR
  261. GOXY 10 10 DRAW BOX 32 2
  262. GOXY 11 11 WRITE "You can create single sounds..."
  263.  
  264. VARIABLE CREATE controlloop TYPE NUMBER 1  ; Variable to control loops
  265.  
  266. MARK loopsound1                ; Create a mark that can be jumped to
  267. VARIABLE CREATE soundloop TYPE NUMBER 1    ; Variable to control sound
  268. DO "sound1.shw"                ; Call another (sub) program
  269. VARIABLE RELEASE soundloop     ; Clean up after us, for next time round
  270. EFFECT SCROLL DOWN
  271. VARIABLE INCREASE controlloop 1
  272. IF controlloop LE 3 DO JUMPMARK loopsound1
  273.  
  274. VARIABLE RELEASE controlloop   ; Clean up after us, for next time round
  275. WAIT 1
  276.  
  277. GOXY 20 8 WRITE "Or play songs, that you write yourself!"
  278. GOXY 20 9 DRAW LINE 38
  279. IF soundtype NE 0 DO
  280.    MUSIC PROCESS "entrance.snd" SND
  281. END
  282. WAIT 1
  283.  
  284. GOXY 20 19 WRITE "Or play sounds in the WAV (windows) format!"
  285. GOXY 20 20 DRAW LINE 42
  286. IF soundtype GE 2 DO
  287.    MUSIC PROCESS "beback.wav" WAV 11000
  288. END
  289. WAIT 3
  290.  
  291. COLOR BACKGROUND 2             ; Set the background to green
  292. SCREEN CLEAR
  293. GOXY 10 8
  294. WRITE "Besides this you can control a lot of things yourself.  You can"
  295. GOXY 10 10
  296. WRITE "draw your own pictures  or  develop your own logo  in DATASHOW."
  297. GOXY 10 12
  298. WRITE "For this purpose there is a menu for graphic drawing..."
  299. WAIT 6
  300.  
  301. SHOW SCREEN "show8.scr" TXT    ; Show screen saved with CAPTURE
  302. WAIT 4
  303.  
  304. SET DELAYFACTOR 5
  305. GOXY 26 12
  306. WINDOW 50 5
  307. SCREEN CLEAR
  308. COLOR FOREGROUND 1
  309. GOXY 26 12
  310. COLOR ATTRIBUTE 47             ; Set to green background, white foreground
  311. DRAW BOX 50 5
  312. GOXY 3 3 WRITE "By selecting F4 you can draw your own drawings,"
  313. GOXY 3 4 WRITE "and then display them from a script like this.."
  314. WAIT 4
  315. GOXY 1 1
  316. WINDOW 79 24
  317.  
  318. IF screentype LT 2 DO
  319.    SCREEN CLEAR
  320.    WRITE "Here a number of graphic screens would have been show.  - These"
  321.    GOXY 1 3
  322.    WRITE "screens require a high graphic mode and cannot be shown on your"
  323.    GOXY 1 5
  324.    WRITE "screen. This demonstration just skips them and continues..."
  325.    GOXY 1 7
  326.    WAIT "Push any key"
  327. END
  328. IF screentype LT 2 DO JUMPMARK skipscreen
  329.  
  330. SET GRAPHICS EGA1
  331. SHOW SCREEN "promote1.gra" GRA
  332. WAIT 4
  333.  
  334. SCREEN WIPE SPLIT
  335.  
  336. SCREEN CLEAR
  337. GOXY 10 10 WRITE "You can also show GRAPHICs created from other programs."
  338. GOXY 10 12 WRITE "Here DataShow display a screen saved in the PCX format -"
  339. GOXY 10 14 WRITE "saved from e.g. the program PaintBrush (TM)."
  340. WAIT 4
  341. DO "sprite1.shw"
  342. WAIT 4
  343.  
  344. SET GRAPHICS EGA1
  345.  
  346. SCREEN CLEAR
  347. GOXY 10 10 WRITE "AND here DataShow displays a screen saved in the GIF"
  348. GOXY 10 12 WRITE "format; made by CompuServe; with a wealth of files."
  349. WAIT 4
  350. SHOW SCREEN "hugo1.gif" GIF
  351. WAIT 4
  352.  
  353. SCREEN CLEAR
  354. GOXY 2 8 WRITE "NOW DataShow ALSO displays screens"
  355. GOXY 2 10 WRITE "saved in the FLI format; That's all"
  356. GOXY 2 12 WRITE "kinds of animations."
  357. WAIT 4
  358. VARIABLE CREATE notimes TYPE NUMBER 0
  359. MARK loopmovie1
  360. SHOW SCREEN "MRNUMO.FLI" FLI
  361. VARIABLE INCREASE notimes 1
  362. IF notimes LE 3 DO JUMPMARK loopmovie1
  363. VARIABLE RELEASE notimes
  364. WAIT 1
  365.  
  366. SET GRAPHICS EGA1
  367.  
  368. COLOR BACKGROUND 1
  369. COLOR FOREGROUND 12
  370. SCREEN CLEAR
  371.  
  372. SET DELAYFACTOR 4
  373.  
  374. GOXY 5 6 WRITE "NEW in DataShow scripts:"
  375. GOXY 5 10 WRITE "Now you can also stay in graphics mode"
  376. GOXY 5 12 WRITE "- and most commands work as in text mode!"
  377. GOXY 5 16 WRITE "ALSO, see GUIDE script for basic introduction"
  378. GOXY 5 18 WRITE "- read all about it in INFO.TXT"
  379. WAIT 3
  380.  
  381. COLOR BACKGROUND 6
  382. COLOR FOREGROUND 14
  383. SCREEN CLEAR
  384. GOXY 10 5
  385. WRITE "Remember to register DataShow. You'll then receive:"
  386. WAIT 2
  387. SET DELAYFACTOR 0
  388. COLOR FOREGROUND 11
  389. GOXY 12 9
  390. WRITE "- A Runtime version called SHOWRUN for distribution of scripts"
  391. WAIT 3
  392. GOXY 12 11
  393. WRITE "- A Manual that can be printed on a printer for overview"
  394. WAIT 3
  395. GOXY 12 13
  396. WRITE "- A Utility package for making more music files"
  397. WAIT 3
  398. GOXY 12 15
  399. WRITE "- And more music and graphics files"
  400. WAIT 3
  401. COLOR FOREGROUND 14
  402. GOXY 10 19
  403. WRITE "See the INFO.TXT ascii file for further information!"
  404. WAIT 4
  405.  
  406. SET GRAPHICS OFF
  407.  
  408. MARK skipscreen                ; Jump to here if insufficient graphics
  409.  
  410. VARIABLE CREATE counttimes TYPE NUMBER 1
  411. DO "scroll1.shw"               ; Call another (sub) program
  412.  
  413. COLOR FOREGROUND 15
  414. SET SHADOW 2
  415.  
  416. GOXY 1 8 WRITE "This was run number: "+counttimes
  417. IF soundtype NE 0 DO
  418.    SPEAK counttimes
  419.    WAIT 1
  420.    SPEAK "T-I-M-E-S"
  421. END
  422. WAIT 1
  423.  
  424. GOXY 10 11
  425. WRITE "Now this presentation starts over again, but you can stop it at"
  426. GOXY 10 13
  427. WRITE "any time you wish by pressing the escape key.  Then in DATASHOW"
  428. GOXY 10 15
  429. WRITE "you can try all the marvellous things yourself!  Just type SHOW"
  430. GOXY 10 17
  431. WRITE "at the operating system prompt, and you can try out DataShow."
  432. WAIT 1
  433.  
  434. GOXY 10 20 WRITE "That's all folks..."
  435. IF soundtype NE 0 DO
  436.    SPEAK "TH-A-T-S AH-L-L F-OH-L-K-S"
  437. END
  438. SET SHADOW OFF
  439. WAIT 6
  440.  
  441. EFFECT GLITTER
  442. SET CURSOR ON
  443.  
  444. VARIABLE INCREASE counttimes 1
  445.  
  446. CONTINUE
  447.