home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0950.lha / BBDoors / BBDoors65.lha / rexxDoors / Steven_Wright.rexx < prev    next >
OS/2 REXX Batch file  |  1993-08-24  |  1KB  |  72 lines

  1. /* $VER: Steven_Wright.rexx 1.0 (24.8.93)
  2.     copyright 1993 Richard Lee Stockton
  3.           FREELY DISTRIBUTABLE
  4. */
  5.  
  6. ARG name . . colorflag .
  7.  
  8. FF='0C'x
  9. CR='0D'x
  10. def=''
  11. pen3=''
  12.  
  13. IF ADDRESS()~='BAUD' THEN CR=''
  14. IF colorflag~=1 THEN
  15.   DO
  16.     def=''
  17.     pen3=''
  18.   END
  19.  
  20. SIGNAL ON BREAK_C
  21. SIGNAL ON BREAK_E
  22.  
  23. bbspath=GETCLIP('BBS_path')
  24. filename=bbspath'rexxDoors/Data/wright.data'
  25. IF ~EXISTS(filename) THEN
  26.   DO
  27.     SAY 'Can''t find data file,' filename'!'CR
  28.     EXIT
  29.   END
  30. size=WORD(STATEF(filename),2)
  31. fragment=size/3000
  32.  
  33. x=OPEN(f,'RAM:DUMMY','W')
  34. IF x=0 THEN EXIT(20);
  35. CALL WRITELN(f,'dummy')
  36. CALL CLOSE(f)
  37. micros=WORD(STATEF('RAM:DUMMY'),7)
  38. location=fragment*micros
  39. IF fragment>1000 THEN
  40.   location=location+fragment*RIGHT(TIME('S'),2)/100
  41. ELSE IF fragment>100 THEN
  42.   location=location+fragment*RIGHT(TIME('S'),1)/10
  43. location=TRUNC(location)
  44. IF location>size THEN location=micros
  45.  
  46. x=OPEN(f,filename,'R')
  47. IF x=0 THEN RETURN(10);
  48. CALL SEEK(f,location,'B')
  49. line=''
  50. DO WHILE line~=FF & ~EOF(f)
  51.   line=READLN(f)
  52. END
  53. line=''
  54. SAY CR
  55. IF ~EOF(f) THEN
  56.   DO WHILE line~=FF & ~EOF(f)
  57.     line=READLN(f)
  58.     IF ~EOF(f) & line~=FF THEN SAY line||CR
  59.   END
  60.  
  61. OPTIONS PROMPT pen3'                                                       -- Steven Wright 'def
  62. PULL junk
  63.  
  64.  
  65. BREAK_C:
  66. BREAK_E:
  67. CALL CLOSE(f)
  68. RETURN
  69. EXIT
  70.  
  71. /* Steven_Wright.rexx */
  72.