home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PCBOARD
/
PAUSEPPE.ZIP
/
PAUSE.PPS
< prev
next >
Wrap
Text File
|
1994-02-12
|
3KB
|
71 lines
;***********************************************************************
;* *
;* PAUSE.PPE V1.00 *
;* *
;* written by: Gary Meeker *
;* *
;* started: 02-12-94 *
;* *
;***********************************************************************
STRING Key ' Keystroke char
STRING FileName ' Filename to Display
STRING ProgressChar ' Progress Character String
BYTE MaxCount ' Length of Progress Character String
BYTE Count ' Progress Character Counter
BYTE Chars ' Number of Characters to display
SWORD Pause ' Wait Pause (0 = infinite, Negative = PAUSE only)
BOOLEAN NoKey ' Don't allow [ENTER] to exit the pause
BOOLEAN Stuff ' Flag to show we need a CR stuffed
ProgressChar = CHR(8)+"\"+CHR(8)+"|"+CHR(8)+"/"+CHR(8)+"-"
MaxCount = LEN(ProgressChar)
Count = 9 ' Start on '-'
Chars = 1 ' Just display 1 character
GETTOKEN Pause ' Get the maximum time to pause
GETTOKEN FileName ' Get the Prompt to display
NoKey = (Pause < 0) ' If negative, then no exit.
Pause = ABS(Pause) * 6 ' Make sure it's positive and counting 1/6 secs.
IF (Pause = 0) LET Pause = 720 ' Maximum time 2 minutes (120 Secs * 6)
'If no filename or special filename is given then use the default and
' indicate we need to stuff a CR into the keyboard buffer so we can
' replace PCBTEXT #418 with our PPE.
IF ((FileName="") | (FileName="!")) THEN
IF (FileName="!") LET Stuff = TRUE
FileName = PPEPATH()+PPENAME()
END IF
'Display the prompt file
IF (EXIST(FileName)) DISPFILE FileName, LANG+SEC+GRAPH
Key = INKEY() ' Get a Keypress from the user
WHILE (NoKey | (Key<>CHR(13))) DO ' Exit when we get an ENTER
' unles NoKey
PRINT MID(ProgressChar, Count, Chars)' Show our progress
Chars = 2 ' Now show 2 chars from here on
Count = Count + 2 ' Point to next progress char.
IF (Count > MaxCount) LET Count = 1 ' Loop back to 1st character
DELAY 3 ' Delay 1/6 a second
DEC Pause ' Decrement our delay
IF (Pause = 0) BREAK ' If 0, we are done
Key = INKEY() ' Get a Keypress if present
WHILE (Key<>"") DO ' Read any keys until none left
IF (Key = CHR(13)) BREAK ' If we got a RETURN we are done
Key = INKEY() ' else Get Another Keypress
END WHILE '
END WHILE
PRINT CHR(13) ' Back to start of line
CLREOL ' Clear the Prompt
KEYFLUSH ' Clear the Keyboard
IF (Stuff) KBDSTUFF CHR(13) ' Stuff a CR if needed
END