home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
OR_WAIT1.ZIP
/
WAIT.PPS
< prev
next >
Wrap
Text File
|
1995-01-04
|
4KB
|
100 lines
; Program : WAIT prompt to replace PCBTEXT #418
; Version : 1.00
; Programmer : Siri\/s / Oriental Royal
; Fidonet addr.: 6:720/301
; BBS : Sirius BBS
; Phone number : +886-2-961-0004, +886-2-962-9282
; Date : 01/03/1995
; Description : This PPS replace the PCBTEXT #418, and it can runs in
; CTTY, ANSI, RIP.
; Please feel free to modify the source code, that's why
; the source code is included. If you do modify it,
; Please don't distribute your version.
; Declaration ----------------------------------------------------
INTEGER X_axis
INTEGER Y_axis
INTEGER Counter
INTEGER EA_Pos ' Erase Arrow start position (X axis)
STRING KeyPress ' The Key user press
STRING CR ' Carriage Return
STRING Windmill(3) ' Store the symbol of Windmill
STRING Prompt ' Prompt string
STRING FileExt ' Language support, the extension of filename
STRING WaitTxt(3) ' Store partial strin of prompt
STRING WaitCfg(5) ' The configuration variable
; Initialization -------------------------------------------------
LET Counter = 1
LET CR = CHR(13)
FOPEN 1,PPEPATH()+"WAIT.CFG",O_RD,S_DW
FDEFIN 1
WHILE (Counter < 6) DO ' Read the config file
FDGET WaitCfg(Counter)
INC Counter
ENDWHILE
FCLOSE 1
LET FileExt = LANGEXT() ' Read language file for prompt
IF (EXIST(PPEPATH()+"WAITTXT"+LANGEXT())) THEN
FOPEN 3,PPEPATH()+"WAITTXT"+LANGEXT(),O_RD,S_DW
LET Counter = 1
WHILE (Counter < 5) DO
FGET 3,WaitTxt(Counter)
INC Counter
ENDWHILE
FCLOSE 3
ELSE ' If language file not found, set default
LET WaitTxt(1) = "Press"
LET WaitTxt(2) = "Enter"
LET WaitTxt(3) = "to continue"
ENDIF
LET Windmill(0) = "φ"
LET Windmill(1) = "-"
LET Windmill(2) = "\"
LET Windmill(3) = "|"
LET Prompt = " "+WaitCfg(4)+" "+WaitTxt(1)+" "+WaitCfg(5)+"["\
+WaitCfg(3)+WaitTxt(2)+WaitCfg(5)+"]"+WaitCfg(4)+" "\
+WaitTxt(3)+" "
; Main Program ---------------------------------------------------
IF (GRAFMODE() = "N") THEN ' Detect user's ANSI capability
PRINT WaitTxt(1)+" ("+WaitTxt(2)+") "+WaitTxt(3)
END ' If No ANSI, end the program
ELSE
PRINT Prompt
ENDIF
LET X_axis = GETX() ' Get cursor X, Y axis value after print prompt
LET Y_axis = GETY()
LET EA_Pos = X_axis+1 ' Set the Erase Arrow X axis next to right windmill
WHILE (KeyPress != CR) DO ' If user didn't press enter
ANSIPOS 1,Y_axis ' move cursor to the begin of prompt
PRINT WaitCfg(1) ' set left windmill color
PRINT Windmill(3-Counter%4) ' print left windmill
ANSIPOS X_axis,Y_axis ' move cursor to the end of prompt
PRINT WaitCfg(2) ' set right windmill color
PRINT Windmill(Counter%4) ' print right windmill
DELAY 1 ' Delay 1/18.2 sec.
INC Counter
LET KeyPress = INKEY()
ENDWHILE
COLOR @X0C ' Set the arrow color to red
WHILE (EA_Pos >= 1) DO ' While loop until the arrow reach the
ANSIPOS EA_Pos,Y_axis ' begin of the prompt
PRINT CHR(174)+"- " ' the space after dash is to to erase
DEC EA_Pos ' previous dash.
ENDWHILE
DEFCOLOR ' Reset current color to default
KBDSTUFF CR ' pass Enter to PCBoard
END