1 / 76

;Text Editor PPE (Saves in file "TEMP.!!!")

;Text Editor PPE (Saves in file "TEMP.!!!"). STRING x ' Temporary storage for cursor x position. STRING y ' Temporary storage for cursor y position. STRING BEEP. STRING CR. STRING FILE. STRING KEY. STRING SECURITY. STRING SUBJECT. STRING TEMP. STRING TO.

triage
Download Presentation

;Text Editor PPE (Saves in file "TEMP.!!!")

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ;Text Editor PPE (Saves in file "TEMP.!!!")

  2. STRING x ' Temporary storage for cursor x position

  3. STRING y ' Temporary storage for cursor y position

  4. STRING BEEP

  5. STRING CR

  6. STRING FILE

  7. STRING KEY

  8. STRING SECURITY

  9. STRING SUBJECT

  10. STRING TEMP

  11. STRING TO

  12. BOOLEAN ECHO

  13. BOOLEAN EXITFLAG

  14. BOOLEAN STOPPLAY

  15. INTEGER NUMCHR

  16. ;***********************************************************************;***********************************************************************

  17. ; Initializations

  18. LET BEEP = CHR(7)

  19. LET CR = CHR(13)

  20. ;***********************************************************************;***********************************************************************

  21. STARTDISP FNS

  22. CLS

  23. INPUTSTR "To",TO,@X0F,35,MASK_ASCII(),NEWLINE

  24. IF (UPPER(TO) = UPPER(U_NAME())) THEN • NEWLINE • PRINTLN "Quit Talking to your self" • END

  25. ELSEIF (TO = "") THEN • NEWLINE • END

  26. ENDIF

  27. INPUTSTR "Subject",SUBJECT,@X0F,30,MASK_ASCII(),NEWLINE

  28. IF (SUBJECT = "") THEN • NEWLINE • END

  29. ENDIF

  30. INPUTSTR "Message Security (R = Private, N = None)",SECURITY,@X0F,1,"RNrn",NEWLINE

  31. INPUTSTR "Echo this Message",TEMP,@X0F,1,"YyNn",NEWLINE

  32. IF (UPPER(TEMP) = "Y") THEN • ECHO = TRUE

  33. ELSE ECHO = FALSE

  34. ENDIF

  35. GOSUB BORDER 'Display the screen border

  36. ANSIPOS 1,3

  37. DELETE PPEPATH()+"TEMP.@@@"

  38. :START

  39. FOPEN 1,PPEPATH()+"TEMP.@@@",O_RW,S_DN

  40. WHILE (key <> CHR(27)) DO 'While the user or sysop dosn't enter an ESC DO • GOSUB GETAKEY • IF (key = CHR(13)) THEN 'If key is a CR do this

  41. GOSUB GETXY 'GET the X/Y possion of the cursor • ANSIPOS 1,y+1 'Move cursor down one line • FPUTLN 1,"" • ELSEIF ((key = CHR(8)) & (x = "1") & (Y <> 3)) THEN • GOSUB GETXY • ANSIPOS 78,y-1 • FSEEK 1,-1,SEEK_CUR • FPUT 1," " • FSEEK 1,-1,SEEK_CUR • ELSEIF ((key = CHR(8)) & (x <> "1")) THEN • BACKUP 1 • PRINT " " • BACKUP 1 • FSEEK 1,-1,SEEK_CUR • FPUT 1," " • FSEEK 1,-1,SEEK_CUR • ELSE 'ELSE PRINT key • GOSUB GETXY • IF (x = 78) THEN • ANSIPOS 1,y+1 • PRINT key • FPUT 1,KEY • ENDIF • GOSUB GETXY • IF (LEN(KEY) = 1) THEN • PRINT key • FPUT 1,KEY • ENDIF

  42. ENDIF

  43. ENDWHILE

  44. SAVESCRN

  45. :PROMPT

  46. ANSIPOS 1,21

  47. CLREOL

  48. PRINTLN "(S)ave (E)dit (A)bort"

  49. CLREOL

  50. ANSIPOS 23,21

More Related