home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 514a.lha / PPB_2.05 / Rexx / Demo.rexx < prev    next >
OS/2 REXX Batch file  |  1991-06-08  |  4KB  |  202 lines

  1. /* Arexx -> PPB Demo */
  2. address command run "ppb -t1 -r4 -d3"
  3. address command waitforport PPB_RX0
  4.  
  5. if ~show('l',"rexxsupport.library") then
  6.     addlib('rexxsupport.library',0,-30,0)
  7.  
  8. address PPB_RX0
  9. /* turn off the mouse pointer */
  10. POINTER
  11.  
  12. len = Length("Welcome to the ARexx -> PPB Demo!")
  13. posx = 320 - ((len * 8) / 2)
  14. text '[Welcome to the ARexx -> PPB Demo!]' posx 20
  15. len = Length("This Macro demonstrates the commands that PPB has to offer.")
  16. posx = 320 - ((len * 8) / 2)
  17. text '[This Macro demonstrates the commands that PPB has to offer.]' posx 30
  18. len = Length("This Text is being shown with the TEXT command.")
  19. posx = 320 - ((len * 8) / 2)
  20. text '[This Text is being shown with the TEXT command.]' posx 40
  21.  
  22. delay(50)
  23. len = Length("The CLEAR command...")
  24. posx = 320 - ((len * 8) / 2)
  25. text '[The CLEAR command...]' posx 60
  26. delay(50)
  27. clear
  28.  
  29. len = Length("The BACKCOLOR command...")
  30. posx = 320 - ((len * 8) / 2)
  31. text '[The BACKCOLOR command...]' posx 50
  32. backcolor 1
  33. delay(50)
  34. CLEAR
  35.  
  36. len = Length("The FORECOLOR command...")
  37. posx = 320 - ((len * 8) / 2)
  38. text '[The FORECOLOR command...]' posx 50
  39. forecolor 5
  40. delay(50)
  41. CLEAR
  42.  
  43. len = Length("The DRAW command...")
  44. posx = 320 - ((len * 8) / 2)
  45. text '[The DRAW command...]' posx 50
  46. strt = posx-10
  47. do i = 0 to ((len*8)+10)
  48.     draw (strt+i) 60
  49. end
  50. delay(50)
  51. CLEAR
  52.  
  53. len = Length("The LINE command...")
  54. posx = 320 - ((len * 8) / 2)
  55. x = posx-10
  56. text '[The LINE command...]' posx 50
  57. LINE x 40 x 60
  58. LINE x 60 x+30 60
  59. delay(50)
  60. clear
  61.  
  62. len = Length("The RECTANGLE command...")
  63. posx = 320 - ((len * 8) / 2)
  64. text '[The RECTANGLE command...]' posx 50
  65. strt = posx-10
  66. RECTANGLE strt 40 len*8+10 60
  67. delay(50)
  68. clear
  69.  
  70. len = Length("The ELLIPSE command...")
  71. posx = 320 - ((len * 8) / 2)
  72. text '[The ELLIPSE command...]' posx 50
  73. ELLIPSE 320 46 (len+20) 20
  74. delay(50)
  75. clear
  76.  
  77. len = Length("The FILL command...")
  78. posx = 320 - ((len * 8) / 2)
  79. text '[The FILL command...]' posx 50
  80. RECTANGLE (posx-10) 40 ((len*8)+10) 60
  81. delay(50)
  82. FORECOLOR 6
  83. FILL
  84. RECTANGLE (posx-10) 40 ((len*8)+10) 60
  85. FORECOLOR 1
  86. delay(50)
  87. clear
  88.  
  89. len = Length("The HTOOLS command...")
  90. posx = 320 - ((len * 8) / 2)
  91. text '[The HTOOLS command...]' posx 50
  92. HTOOLS
  93. DELAY(50)
  94.  
  95. len = Length("The STOOLS command...")
  96. posx = 320 - ((len * 8) / 2)
  97. text '[The STOOLS command...]' posx 50
  98. STOOLS
  99. DELAY(50)
  100.  
  101. len = Length("The HPPB command...")
  102. posx = 320 - ((len * 8) / 2)
  103. text '[The HPPB command...]' posx 50
  104. DELAY(50)
  105. HPPB
  106. DELAY(50)
  107.  
  108. SPPB
  109. len = Length("The SPPB command...")
  110. posx = 320 - ((len * 8) / 2)
  111. text '[The SPPB command...]' posx 50
  112. DELAY(50)
  113.  
  114. len = Length("The SWAPBITMAP command...")
  115. posx = 320 - ((len * 8) / 2)
  116. text '[The SWAPBITMAP command...]' posx 50
  117. len = Length("BITMAP 1")
  118. posx = 320 - ((len * 8) / 2)
  119. FORECOLOR 5
  120. text '[BITMAP 1]' posx 60
  121. DELAY(50)
  122. SWAPBITMAP
  123. len = Length("The SWAPBITMAP command...")
  124. posx = 320 - ((len * 8) / 2)
  125. text '[The SWAPBITMAP command...]' posx 50
  126. len = Length("BITMAP 2")
  127. posx = 320 - ((len * 8) / 2)
  128. FORECOLOR 4
  129. text '[BITMAP 2]' posx 60
  130. DELAY(70)
  131. SWAPBITMAP
  132. FORECOLOR 1
  133. DELAY(50)
  134. clear
  135.  
  136. len = Length("The DFONT command...")
  137. posx = 320 - ((len * 8) / 2)
  138. text '[The DFONT command...]' posx 50
  139. DFONT '[diamond.font]' 20
  140. len = Length("Diamond Font 20")
  141. posx = 320 - ((len * 12) / 2)
  142. text '[Diamond Font 20]' posx 100
  143. DELAY(50)
  144. clear
  145.  
  146. RFONT '[topaz.font]' 8
  147. len = Length("The RFONT command...")
  148. posx = 320 - ((len * 8) / 2)
  149. text '[The RFONT command...]' posx 50
  150. len = Length("Topaz Font 8")
  151. posx = 320 - ((len * 12) / 2)
  152. text '[Topaz Font 8]' posx 100
  153. DELAY(50)
  154. clear
  155.  
  156. fill
  157. len = Length("The BRUSH command...")
  158. posx = 320 - ((len * 8) / 2)
  159. text '[The BRUSH command...]' posx 50
  160. forecolor 1
  161. rectangle 0 0 10 10
  162. forecolor 2
  163. line 0 0 10 10
  164. forecolor 3
  165. line 0 10 10 0
  166. brush 0 0 10 10
  167. delay (50)
  168.  
  169. len = Length("The SBRUSH command...")
  170. posx = 320 - ((len * 8) / 2)
  171. text '[The SBRUSH command...]' posx 50
  172. sbrush '[ram:test.b]'
  173.  
  174. len = Length("The OPENPIC command...")
  175. posx = 320 - ((len * 8) / 2)
  176. text '[The OPENPIC command...]' posx 50
  177. DELAY(40)
  178. OPENPIC '[/Example_Interface.h_2.pic]'
  179.  
  180. len = Length("The PRINT command...")
  181. posx = 320 - ((len * 8) / 2)
  182. text '[The PRINT command...]' posx 15
  183. DELAY(40)
  184. FORECOLOR 0
  185. text '[The PRINT command...]' posx 15
  186. HTOOLS
  187. /*PRINT*/
  188. CLEAR
  189. HTOOLS
  190. len = Length("The ENDPPB command...")
  191. posx = 320 - ((len * 8) / 2)
  192. text '[The ENDPPB command...]' posx 15
  193. DELAY(40)
  194. CLEAR
  195. len = Length("GOOD BYE")
  196. posx = 320 - ((len * 8) / 2)
  197. DFONT '[diamond.font]' 20
  198. FORECOLOR 1
  199. text '[GOOD BYE]' posx 190
  200. delay(70)
  201. endppb
  202.