home *** CD-ROM | disk | FTP | other *** search
- ; Example of Press Enter replacement PPE
-
- #ppe
- #libpath ..\..\lib
- #user
- #use moveto
- #use synchro
-
- ;----------------------------------------------------------------------------
-
- Declare Procedure ShowStr()
- Declare Procedure Anim()
-
- ;----------------------------------------------------------------------------
-
- Integer StrLen, Col, ColorTabl(3), _Step
- String Str
-
- ;----------------------------------------------------------------------------
-
- ; Initialisations
-
- ColorTabl(0) = @X08
- ColorTabl(1) = @X07
- ColorTabl(2) = @X0F
- ColorTabl(3) = @X07
- _Step = 0
-
- Str = "PReSS ENTeR!"
- StrLen = Len(StripATX(Str))
-
- ; Move to bottom of screen (we use MoveTo() so we don't appear in the
- ; middle of the screen for 50 lines terminals users)
-
- MoveTo(((80-Len(Str))/2+Len(Str)), 23)
-
- Col = ColorTabl(_Step)
-
- Inc _Step
- ShowStr()
-
- While (1) Do
- If (OutBytes() > 0) Continue
- Col = ColorTabl(_Step)
- Inc _Step
- If (_Step = 4) _Step = 0
- ShowStr()
- If (Inkey() != "") Break
- EndWhile
-
- Anim()
- MoveTo(1,23)
-
- ; KbdStuff a Chr(13) (carriage return) to the original prompt, so we won't
- ; see a "?" appear
-
- KbdStuff Chr(13)
-
- End
-
- ;----------------------------------------------------------------------------
-
- Procedure ShowStr()
-
- Backup StrLen
- Color Col
- Print Str
- Delay 2
-
- End Proc
-
- ;----------------------------------------------------------------------------
- Procedure Anim()
-
- Int A
-
- Color 15
-
- For A = 1 To 11
-
- Backup StrLen
-
- Select Case A
- Case 1
- Print "PReSS ENTeR!"
- Case 2
- Print "PReSSNTeR!"
- Case 3
- Print "PReS@X07**@X0FTeR!"
- Case 4
- Print "@X0FPRe@X07*@X08++@X07*@X0FeR!"
- Case 5
- Print "@X0FPR@X07*@X08+∙∙+@X07*@X0FR!"
- Case 6
- Print "@X0FP@X07*@X08+∙ ∙+@X07*@X0F!"
- Case 7
- Print "@X0F@X07*@X08+∙ ∙+@X07*@X0F"
- Case 8
- Print "@X07*@X08+∙ ∙+@X07*"
- Case 9
- Print "@X08+∙ ∙+"
- Case 10
- Print "∙ ∙"
- Case 11
- Print " "
- End Select
-
- Delay 1
- Synchro()
-
- Next
-
- Endproc
-