We have here some Uedit commands useful for BBSing. We've got things do quote text with a marker at the start of each line, like this: PK> Well blah blah blah blah blah, and blah PK> blah blah blah... and we've got functions for using Uedit to edit messages online and send text back and forth with Rexx. The versions given here work with BaudBandit 1.00 and 1.50, and VLT 4.824, and it shouldn't be hard to get them to work with other Rexx-compatible terminals. The way mine is set up is, there's a function key in BaudBandit which saves the review buffer in ram disk and then runs a Rexx file called "Cap2Uedit", which makes Uedit (if auto-traffic is on) load in that capture file and show the last page of it. That script also sends characters out the modem every few seconds to keep the bbs on the other end from hanging up on you. You then compose your message in Uedit, using the quoting commands mentioned above, and then press rAmiga-7, which saves the current buffer, pads its empty lines with spaces, and causes BaudBandit to ascii-send it. The general procedure is to give the bbs commands to reply and wait until it is actually waiting for you to type in the message before you press the Cap2Uedit function key. That key is defined with the string "\av\mCap2Uedit" in BaudBandit. Then you compose your reply and press rAmiga-7 to send it. While you are composing it, Cap2Uedit is sending space-backspace out the modem every ten seconds. After five minutes it will make a noise (using the Play8SVX program - remove these lines if you don't have it or don't want to use it) to remind you that you're still on the phone. It will stop sending space-backspaces if you press another function key defined as "\mShutup-Cap2Uedit". NOTE that BaudBandit cannot exit if any rexx script it started is still running. If you tell it to quit and it doesn't, try using the Shutup-Cap2Uedit macro and see if it quits then. Or you could use amiga-B "Stop ARexx" but it might respond sluggishly. Files named Cap2Uedit.baud, Cap2Uedit.vlt, and Shutup-Cap2Uedit.baud should be included with this file. The VLT version of Shutup-Cap2Uedit is identical to the BaudBandit version (just rename it with the ending .vlt); the Cap2Uedit program differs slightly between the two. There should also be a file called MessageSend.vlt, which is needed to use rAmiga-7 with VLT. BaudBandit does not need a MessageSend program. All of these .baud or .vlt files, whichever set is appropriate for the terminal you are using, should go in your REXX: directory. The Cap2Uedit scripts also require a RunBack program if you want them to be able to start Uedit if it is not already running when you use them. In order for this to work with the Zimmerman auto-traffic interface, you have to create an auto-traffic command in your REXXCOMM file called LOADCAPTURE that runs the key virtual-f7 (macronum 1126) given below. You should also have a FRONTSCREEN command that runs virtual-1 (macronum 1041) given below, but that can be left out if you remove the line that uses it from the Cap2Uedit file. See the notes below on virtual-1, because it won't work very well unless your system is set up properly. Some of the advice for virtual-1 will benefit many other programs as well. My version of Cap2Uedit is also set up to tell Uedit to use an IBM font, using the SETFONT rexx command. Naturally this only works with Uedit 2.6a or newer. If you use SETFONT you don't actually need FRONTSCREEN because SETFONT reopens Uedit's screen anyway. An appropriate IBM font (one with the first four characters missing because of a problem in Uedit) is included. Put this in REXXCOMM: loadcapture 1126+0 | frontscreen 1041+0 | setfont 995+0 | I have just tested the stuff with BaudBandit 1.50, and it works fine except that whenever you send the review buffer to Uedit it writes "RAM:Capture Written" (or whatever filename you use) on the screen. This "feature" was not present in BB 1.00. To shut it up, you'll have to do what I did: Find the word at byte offset 10830 (hex 2A4E) in the BaudBandit file. It should be hex 4878. Change it to 6010. Then move to offset 10876 (hex 2A7C). It should be 41FA. Change it to 6006. If the two existing values are not 4878 and 41FA, then you may have a slightly different version; DO NOT change the values unless both of the old ones are as described. One other hint for using BaudBandit with IBM character sets in color: use FED to change the IBM font you're using so that it is marked as boldface. Save the "8b" font and delete the regular "8" non-boldface one. Otherwise half the text you get from a color bbs will be boldfaced, which if you had a 16 color screen would be activating the other 8 colors. ====================== So here are some BBSing functions: Remove all ANSI escape sequences and backspaces from buffer Turn off trueTabs in curfile with no side effects Turn off trueTabs in curfile with no side effects *** UEK VERSION (more efficient) ....... Flags peek(n0, n1, 2) .. Flags value and(n1, n1, 0xfffe) .. mask off trueTabs poke(n0, n1, 2) pop(n99, n1) .. 2.6 version pop(n99, n0) .. 2.6 version .... pop(n1) .. PRE-2.6 VERSION .... pop(n0) .. PRE-2.6 VERSION > The idea of this here command is to paste in a block of text as a bbs quote, with XX> (initials or whatever) at the beginning of each line. After you cut or copy hilite from somewhere, it inserts that text at the cursor. It reformats all paragraphs in the freshly pasted hilite region, and (for the present) keeps the right margin down to 71 at the most including the string it adds to the beginning of each line, which it asks for each time (default is "> "). Someday I want to make this so that any line shorter than about rightmargin minus 20 does not get reformatted. We also someday want a command to strip the existing leading whatever and then do something like this. We also want a function to reformat paragraphs where each line begins with a comment indicator such as "; ", for programming use. These could all use common routines? THIS USES N48 as a flag to tell it whether to reformat paragraphs inside the quote. By default it does. It is here set up to clear n48 whenever it's run, so that the command which sets n48 (rAmiga-6) has to be used before each unformatted quoting. To change, just search for n48 ... it's in L-q and R-6. Warning: some of the spell-checking functions (at least the last versions I've seen) randomly trash n48 and n49. Paste hilite as bbs-style quote; XX> before each line ", all) movecursor(buf54, sfile) putmsg( "What should I put at the beginning of each line? (keep it short)") inputstring(buf54) filesize(buf54, n54) if (getflag(curfile, truetabs)) runkey(virtual-f5) getlocal(curfile, n50, linelength) equatenum(n51, n50) if (gtnum(n51, 71)) equatenum(n51, 71) sub(n51, n51, n54) if (gtnum(20, n51)) { .. 20 is arbitrary alertuser("Leading string too long. Get real.") returnfalse } runkey(normal-kpenter) .. shft-kpenter for me because I use normal-kpenter for a normal newline key setlocal(curfile, linelength, n51) movecursor(curfile, ehilite) if (not is(curfile, eline)) insertchar(curfile, eline) insertchar(curfile, eline) movecursor(curfile, shilite) if (not is(curfile, sline)) { insertchar(curfile, eline) incloc(curfile, shilite) } insertchar(curfile, eline) if (eqnum(n48, 0)) { while (gtloc(curfile, ehilite, atcursor)) runkey(ctl-3) } else equatenum(n48, 0) movecursor(curfile, shilite) movecursor(curfile, echar) while (gtloc(curfile, ehilite, atcursor)) { insertrgn(curfile, atcursor, buf54, all) movecursor(curfile, downline) if (not is(curfile, sline)) movecursor(curfile, sline) } movecursor(curfile, shilite) clearchar(curfile) movecursor(curfile, ehilite) clearchar(curfile) setlocal(curfile, linelength, n50) ... setlocal(curfile, linelength, 71) .. my own preference > Cause next bbs-style quote to not reformat paragraphs Drag mouse to make bbs-style quote in file "t:reply" ... just a package for convenience Find a file buffer by name (supply name in buf50) Rexx: load in a named capture file and show last page Pad all empty lines with one space Send Uedit's screen to the front for the above to work at all efficiently, you must make C:Run resident and be using SetPatch from AmigaDOS 1.3.2 or newer. Otherwise it will load the Run program from disk every time you call it. You should do so anyway, because otherwise ANY program that uses the AmigaDOS Execute() function to run other programs will be very inefficient. Also you should either make C:Endif resident and use AmigaShell (make L:Shell-Seg resident), or copy the endif program into ramdisk and change the command above to "ram:endif". Or you could call it "ram:DoNothing" or something because the endif program literally does nothing at all. Otherwise it will load c:Endif from disk. With everything resident virtual-1 will run in about a tenth of a second, moving Uedit's screen to the back and then back to the front. REMEMBER, EVEN IF YOU NEVER MAKE ANYTHING ELSE RESIDENT, DO make C:Run resident, and use SetPatch 1.3.2 or newer. Cause BaudBandit to ascii-send current buffer, fix empty lines Set Uedit's font (arg string is fontname, space, size; e.g. "topaz 8") <995: movecursor(buf61, sfile) movecursor(buf61, eword) while (is(buf61, whitespace)) clearchar(buf61) tonumber(n54, buf61) equateloc(buf61, locA, atcursor) equateloc(buf61, locB, efile) clearrgn(buf61, loc) movecursor(buf61, sfile) tolower(buf61) while (movecursor(buf61, echar)) tolower(buf61) if (!setfont(buf61, n54)) putmsg("Could not set font") ... SHOULD HANDLE ERROR BETTER else { toggle(totiny) .. reopen screen toggle(totiny) } >