home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
text
/
editors
/
uedit-stuff
/
cap2uedit.baud
< prev
next >
Wrap
Text File
|
1991-01-10
|
3KB
|
91 lines
/* Cause Uedit to display the last page of BaudBandit 1.00's scrollback
buffer, and keep the bbs from hanging up in the meantime.
This program refers several times to the command "Play8SVX", which is used
to play IFF sound samples. The idea is that it makes a noise when the
user needs to be alerted. If you don't have Play8SVX or don't want to use
it, simply comment out all the lines that mention it. If you do want to
use it, replace "scream" with the pathname of an appropriate sound sample.
This program can optionally change Uedit's font to an IBM font called
shortibm 8. Just un-comment the line that includes the command "setfont
shortibm 8". That font should be included with this. It is a variant of
cleanibm 8 which is missing the first four characters. They are missing
because Uedit 2.6a ralphs on trying to actually display ascii values 1-3
as printable characters.
This script requires RunBack in order to start Uedit if it's not already
running. And you should change "UE" in the line that gives the command
"runback UE" to whatever Uedit's pathname is on your system.
*/
options results
pname = 'Cap2Uedit-signal'
stat c /* ask the name of the capture file */
file = result
if ~show('l','rexxsupport.library') then
if ~addlib('rexxsupport.library',0,-30) then do
address command 'play8svx scream'
msgraw "Can't open rexxsupport!" || '1B'x || '[23D'
exit 25
end
if show('Ports', pname) then do
msgraw " Old Cap2Uedit is still running!" || '1B'x || '[32D'
address AREXX "'address """pname""" foo'" /* asynchronous */
do i = 1 to 20
call delay(25) /* half a second */
if ~show('Ports', pname) then leave
end
if ~show('Ports', pname) then
msgraw " It's Gone. " || '1B'x || '[32D'
else do
address command 'play8svx scream'
msgraw " Other Cap2Uedit won't go away! " || '1B'x || '[32D'
exit 25
end
end
if show('Ports', 'URexx') then
frontit = 1
else do
msgraw "Starting Uedit..." || '1B'x || '[17D'
address command 'RunBack UE' /* <=- FIX PATH AS APPROPRIATE */
do while ~show('Ports', 'URexx')
call delay(20)
end
frontit = 0
end
address 'URexx' 'loadcapture' file
if frontit == 1 then address 'URexx' 'frontscreen'
/*** address 'URexx' 'setfont shortibm 8' */
/* if you use the 'setfont' line, comment out the 'frontscreen' line. */
if ~OpenPort(pname) then do
address command 'play8svx scream'
msgraw "Can't open signal port!" || '1B'x || '[23D'
exit 15
end
do i = 1 to 600 /* ten minutes max */
call delay(50) /* one second per pass */
pak = GetPkt(pname)
if pak ~= '00000000'x then leave
if (i // 10 == 0) then /* keep the bbs awake */
send ' ' || '08'x /* nul isn't wakeful enuf */
if (i > 300 & i // 60 == 0) then
address command 'play8svx scream' /* time's a wastin */
end
if pak ~= '00000000'x then
call Reply(pak, 0) /* Uedit is waiting for a reply */
else do
address command 'play8svx scream'
msgraw "Okay, I'm letting it hang up..." || '1B'x || '[31D'
exit 15
end