home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
dp004b4.zip
/
DPHELP4.SCR
< prev
next >
Wrap
Text File
|
1997-08-09
|
6KB
|
198 lines
clear
fore=15
text=
text=
text= Scripting
text=
fore=3
text= Scripting is the most flexible way to have a page. All the scripting
text=commands are covered here. Keep in mind, when making a script, the
text=file extension must be .SCR
text=
text= The basic command syntax is:
fore=11
text=
text=command=parameter
text=
fore=3
text=However, with a few commands, it is simply
fore=11
text=
text=command
text=
fore=3
text= If the command you use requires a parameter you must use the first
text=syntax, otherwise, you would use the second syntax.
text=
fore=15
text=Press 1 to view a command reference or 2 to return to help menu.
#retry
wait=key
ifkey=2 run=dphelp.scr
ifkey=1 goto=cmdref
goto=retry
#cmdref
clear
text=
text=
fore=15
text= Command Reference
text=
fore=11
text= Command: TEXT=string
fore=3
text= This command will show a line of text on the screen. Example:
fore=11
text= TEXT=Hello world!
fore=3
text= Will show "Hello world!" on the screen.
text=
fore=11
text= Command: FORE=number
fore=3
text= This command will change the foreground color. Valid numbers are
text= 0-15. Example:
fore=11
text= FORE=15
fore=3
text= Will change the foreground color to 15 (bright white).
text= A color reference is at the end of this command reference.
fore=11
text=
text= Command: BACK=number
fore=3
text= This command changes the background color. Valid numbers are
text= 0-7. Example:
fore=11
text= BACK=1
fore=3
text= Will change the background color to 1 (blue). Use the color
text= table at the end of this command reference for all colors.
fore=15
text=Press a key to continue, Q to quit, or C for color table.
wait=key
ifkey=Q run=dphelp.scr
ifkey=C goto colors
clear
fore=11
text= Command: SHOW=filename
fore=3
text= This command will show a text/ascii file and pause at the end
text= of a screen. (NOTE: Use the RUN command for ansi files) Example:
fore=11
text= SHOW=FILE.TXT
fore=3
text= Will show FILE.TXT on the screen and pause at the end of a screen.
fore=11
text=
text= Command: RUN=filename
fore=3
text= This command can be used to run another script, or alternately,
text= to view an ANSI/TEXT/ASCII file in your directory. Example:
fore=11
text= RUN=NEXT.SCR
fore=3
text= Would run the script NEXT.SCR.
text=
fore=11
text= Command: WAIT=number or KEY
fore=3
text= This command will wait number milliseconds (ie 2000 will delay 2
text= seconds). However, if KEY is used here, it will wait for the
text= user to press a key. (for menus, you should use this command
text= and then the IFKEY command to evaluate the user's keystroke.)
text= Example:
fore=11
text= WAIT=KEY
fore=3
text= Will wait for the user to press a key.
text=
fore=15
text=Press a key to continue, Q to quit, or C for a color table.
wait=key
ifkey=Q run=dphelp.scr
ifkey=C goto=colors
clear
fore=11
text= Command: IFKEY=char command
fore=3
text= This command is used to evaluate the user's keystroke as
text= returned from the WAIT=KEY command, and then run COMMAND.
text= Example program:
fore=11
text=
text= fore=10
text= text=Press a key.
text= wait=key
text= ifkey=A text=You pressed A!
text= ifkey=B show=b.txt
text= ifkey=C run=next.scr
text= fore=15
text= text=Press any key to continue
text= wait=key
text=
fore=15
text=Press a key to continue, Q to quit, or C for a color table.
wait=key
ifkey=Q run=dphelp.scr
ifkey=C goto=colors
clear
text= Command: GOTO=label
fore=3
text= This command will go to a label in your program. A label is a
text= line that starts with #. However you should NOT include the #
text= on the GOTO statement. Example program:
fore=11
text=
text= #jumpback
text= text=This is the beginning.
text= text=Press A to jump back or B to jump ahead. Any other key continues.
text= wait=key
text= ifkey=A goto=jumpback
text= ifkey=B goto=jumpahead
text= text=You didn't press A nor B....
text= #jumpahead
text= text=This is the end!
text=
fore=15
text=Press a key to continue, Q to quit, or C for a color table.
wait=key
ifkey=Q run=dphelp.scr
ifkey=C goto=colors
fore=11
text= Command: CLEAR
fore=3
text= This command will clear the screen. Just put it on a new line
text= and when it is reached it will clear the screen.
text=
fore=11
text= Command: QUIT
fore=3
text= This command will exit the script and return to the DataPage main
text= menu. Use it on a new line without parameters.
text=
fore=15
text=Press any key for a color table or Q to quit.
wait=key
ifkey=q run=dphelp.scr
#colors
clear
text=
fore=3
text= Foreground colors are the numbers 0-15, and background colors
text= only use 0-7.
text=
fore=15
text= 0 - Black 8 - Gray
text= 1 - Blue 9 - Light Blue
text= 2 - Green 10 - Light Green
text= 3 - Cyan 11 - Light Cyan
text= 4 - Red 12 - Light Red
text= 5 - Violet 13 - Light Violet
text= 6 - Brown 14 - Yellow
text= 7 - White 15 - Bright White
text=
text=Press any key to return to help menu.
wait=key
run=dphelp.scr