home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / dp004b4.zip / DPHELP4.SCR < prev    next >
Text File  |  1997-08-09  |  6KB  |  198 lines

  1. clear
  2. fore=15
  3. text=
  4. text=
  5. text=                                 Scripting
  6. text=
  7. fore=3
  8. text=   Scripting is the most flexible way to have a page.  All the scripting
  9. text=commands are covered here.  Keep in mind, when making a script, the
  10. text=file extension must be .SCR
  11. text=
  12. text=   The basic command syntax is:
  13. fore=11
  14. text=
  15. text=command=parameter
  16. text=
  17. fore=3
  18. text=However, with a few commands, it is simply
  19. fore=11
  20. text=
  21. text=command
  22. text=
  23. fore=3
  24. text=   If the command you use requires a parameter you must use the first
  25. text=syntax, otherwise, you would use the second syntax.
  26. text=
  27. fore=15
  28. text=Press 1 to view a command reference or 2 to return to help menu.
  29. #retry
  30. wait=key
  31. ifkey=2 run=dphelp.scr
  32. ifkey=1 goto=cmdref
  33. goto=retry
  34. #cmdref
  35. clear
  36. text=
  37. text=
  38. fore=15
  39. text=                               Command Reference
  40. text=
  41. fore=11
  42. text=    Command: TEXT=string
  43. fore=3
  44. text=           This command will show a line of text on the screen. Example:
  45. fore=11
  46. text=   TEXT=Hello world!
  47. fore=3
  48. text=           Will show "Hello world!" on the screen.
  49. text=
  50. fore=11
  51. text=    Command: FORE=number
  52. fore=3
  53. text=           This command will change the foreground color.  Valid numbers are
  54. text=           0-15. Example:
  55. fore=11
  56. text=   FORE=15
  57. fore=3
  58. text=           Will change the foreground color to 15 (bright white).
  59. text=           A color reference is at the end of this command reference.
  60. fore=11
  61. text=
  62. text=    Command: BACK=number
  63. fore=3
  64. text=           This command changes the background color.  Valid numbers are
  65. text=           0-7. Example:
  66. fore=11
  67. text=   BACK=1
  68. fore=3
  69. text=           Will change the background color to 1 (blue).  Use the color
  70. text=           table at the end of this command reference for all colors.
  71. fore=15
  72. text=Press a key to continue, Q to quit, or C for color table.
  73. wait=key
  74. ifkey=Q run=dphelp.scr
  75. ifkey=C goto colors
  76. clear
  77. fore=11
  78. text=    Command: SHOW=filename
  79. fore=3
  80. text=           This command will show a text/ascii file and pause at the end
  81. text=           of a screen.  (NOTE: Use the RUN command for ansi files) Example:
  82. fore=11
  83. text=   SHOW=FILE.TXT
  84. fore=3
  85. text=           Will show FILE.TXT on the screen and pause at the end of a screen.
  86. fore=11
  87. text=
  88. text=    Command: RUN=filename
  89. fore=3
  90. text=           This command can be used to run another script, or alternately,
  91. text=           to view an ANSI/TEXT/ASCII file in your directory. Example:
  92. fore=11
  93. text=   RUN=NEXT.SCR
  94. fore=3
  95. text=           Would run the script NEXT.SCR.
  96. text=
  97. fore=11
  98. text=    Command: WAIT=number or KEY
  99. fore=3
  100. text=           This command will wait number milliseconds (ie 2000 will delay 2
  101. text=           seconds).  However, if KEY is used here, it will wait for the
  102. text=           user to press a key. (for menus, you should use this command
  103. text=           and then the IFKEY command to evaluate the user's keystroke.)
  104. text=           Example:
  105. fore=11
  106. text=   WAIT=KEY
  107. fore=3
  108. text=           Will wait for the user to press a key.
  109. text=
  110. fore=15
  111. text=Press a key to continue, Q to quit, or C for a color table.
  112. wait=key
  113. ifkey=Q run=dphelp.scr
  114. ifkey=C goto=colors
  115. clear
  116. fore=11
  117. text=    Command: IFKEY=char command
  118. fore=3
  119. text=           This command is used to evaluate the user's keystroke as
  120. text=           returned from the WAIT=KEY command, and then run COMMAND.
  121. text=           Example program:
  122. fore=11
  123. text=
  124. text=   fore=10
  125. text=   text=Press a key.
  126. text=   wait=key
  127. text=   ifkey=A text=You pressed A!
  128. text=   ifkey=B show=b.txt
  129. text=   ifkey=C run=next.scr
  130. text=   fore=15
  131. text=   text=Press any key to continue
  132. text=   wait=key
  133. text=
  134. fore=15
  135. text=Press a key to continue, Q to quit, or C for a color table.
  136. wait=key
  137. ifkey=Q run=dphelp.scr
  138. ifkey=C goto=colors
  139. clear
  140. text=    Command: GOTO=label
  141. fore=3
  142. text=           This command will go to a label in your program.  A label is a
  143. text=           line that starts with #.  However you should NOT include the #
  144. text=           on the GOTO statement.  Example program:
  145. fore=11
  146. text=
  147. text=   #jumpback
  148. text=   text=This is the beginning.
  149. text=   text=Press A to jump back or B to jump ahead. Any other key continues.
  150. text=   wait=key
  151. text=   ifkey=A goto=jumpback
  152. text=   ifkey=B goto=jumpahead
  153. text=   text=You didn't press A nor B....
  154. text=   #jumpahead
  155. text=   text=This is the end!
  156. text=
  157. fore=15
  158. text=Press a key to continue, Q to quit, or C for a color table.
  159. wait=key
  160. ifkey=Q run=dphelp.scr
  161. ifkey=C goto=colors
  162. fore=11
  163. text=    Command: CLEAR
  164. fore=3
  165. text=           This command will clear the screen.  Just put it on a new line
  166. text=           and when it is reached it will clear the screen.
  167. text=
  168. fore=11
  169. text=    Command: QUIT
  170. fore=3
  171. text=           This command will exit the script and return to the DataPage main
  172. text=           menu.  Use it on a new line without parameters.
  173. text=
  174. fore=15
  175. text=Press any key for a color table or Q to quit.
  176. wait=key
  177. ifkey=q run=dphelp.scr
  178. #colors
  179. clear
  180. text=
  181. fore=3
  182. text=           Foreground colors are the numbers 0-15, and background colors
  183. text=           only use 0-7.
  184. text=
  185. fore=15
  186. text=   0 - Black                        8 - Gray
  187. text=   1 - Blue                         9 - Light Blue
  188. text=   2 - Green                       10 - Light Green
  189. text=   3 - Cyan                        11 - Light Cyan
  190. text=   4 - Red                         12 - Light Red
  191. text=   5 - Violet                      13 - Light Violet
  192. text=   6 - Brown                       14 - Yellow
  193. text=   7 - White                       15 - Bright White
  194. text=
  195. text=Press any key to return to help menu.
  196. wait=key
  197. run=dphelp.scr
  198.