home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / uedit-stuff_429.lzh / Uedit-Stuff / Cap2Uedit.vlt < prev    next >
Text File  |  1991-01-10  |  3KB  |  93 lines

  1. /* Cause Uedit to display the last page of VLT 4.824's scrollback buffer,
  2.    and keep the bbs from hanging up in the meantime.
  3.  
  4.    This program refers several times to the command "Play8SVX", which is used
  5.    to play IFF sound samples.  The idea is that it makes a noise when the
  6.    user needs to be alerted.  If you don't have Play8SVX or don't want to use
  7.    it, simply comment out all the lines that mention it.  If you do want to
  8.    use it, replace "scream" with the pathname of an appropriate sound sample.
  9.  
  10.    This program can optionally change Uedit's font to an IBM font called
  11.    shortibm 8.  Just un-comment the line that includes the command "setfont
  12.    shortibm 8".  That font should be included with this.  It is a variant of
  13.    cleanibm 8 which is missing the first four characters.  They are missing
  14.    because Uedit 2.6a ralphs on trying to actually display ascii values 1-3
  15.    as printable characters.
  16.  
  17.    This script requires RunBack in order to start Uedit if it's not already
  18.    running.  And you should change "UE" in the line that gives the command
  19.    "runback UE" to whatever Uedit's pathname is on your system.
  20.  */
  21.  
  22. address VLT
  23. options results
  24. pname = 'Cap2Uedit-signal'
  25.  
  26. file = "T:Review"
  27. 'review s'            /* select all lines */
  28. 'review a'file        /* and save it - note no space after a' */
  29.  
  30. if ~show('l','rexxsupport.library') then
  31.     if ~addlib('rexxsupport.library',0,-30) then do
  32.     address command 'play8svx scream'
  33.     emit '"Can''t open rexxsupport!' || '1B'x || '[23D"'
  34.     exit 25
  35.     end
  36.  
  37. if show('Ports', pname) then do
  38.     emit '" Old Cap2Uedit is still running!' || '1B'x || '[32D"'
  39.     address AREXX "'address """pname""" foo'"    /* asynchronous */
  40.     do i = 1 to 20
  41.     call delay(25)                /* half a second */
  42.     if ~show('Ports', pname) then leave
  43.     end
  44.     if ~show('Ports', pname) then
  45.     emit '" It's Gone.                     ' || '1B'x || '[32D"'
  46.     else do
  47.     address command 'play8svx scream'
  48.     emit '" Other Cap2Uedit won't go away! ' || '1B'x || '[32D"'
  49.     exit 25
  50.     end
  51. end
  52.  
  53. if show('Ports', 'URexx') then
  54.     frontit = 1
  55. else do
  56.     emit '"Starting Uedit...' || '1B'x || '[17D"'
  57.     address command 'runback util:uek'
  58.     do while ~show('Ports', 'URexx')
  59.     call delay(20)
  60.     end
  61.     frontit = 0
  62. end
  63.  
  64. address 'URexx' 'loadcapture' file
  65. if frontit == 1 then address 'URexx' 'frontscreen'
  66. /*** address 'URexx' 'setfont shortibm 8'  */
  67.  
  68. /* if you use the 'setfont' line, comment out the 'frontscreen' line. */
  69.  
  70. if ~OpenPort(pname) then do
  71.     address command 'play8svx scream'
  72.     emit '"Can't open signal port!' || '1B'x || '[23D"'
  73.     exit 15
  74. end
  75.  
  76. do i = 1 to 600                /* ten minutes max */
  77.     call delay(50)            /* one second per pass */
  78.     pak = GetPkt(pname)
  79.     if pak ~= '00000000'x then leave
  80.     if (i // 10 == 0) then        /* keep the bbs awake */
  81.     send ' ' || '08'x        /* nul isn't wakeful enuf */
  82.     if (i > 300 & i // 60 == 0) then
  83.     address command 'play8svx scream'        /* time's a wastin */
  84. end
  85.  
  86. if pak ~= '00000000'x then
  87.     call Reply(pak, 0)        /* Uedit is waiting for a reply */
  88. else do
  89.     address command 'play8svx scream'
  90.     emit '"Okay, I'm letting it hang up...' || '1B'x || '[31D"'
  91.     exit 15
  92. end
  93.