TIP: Click on subject to list as thread! ANSI
echo: qedit
to: GERRIT KUEHN
from: LEE JACKSON
date: 1996-06-15 06:02:00
subject: Re: uuencoding in QEdit / TSE

Quoting Gerrit Kuehn to *.*:
 GK> I'm using TSE for writing eMails. Does anyone have a macro for QEdit
 GK> or TSE which prompts for a filename, uuencodes the file with an
 GK> external uucoder and inserts the coded text in my mail? I think using
 GK> PGP or some other encryption with the editor would be technically
 GK> nearly the same, so such an implementation would most probably be
 GK> helpful, too. 
Well, here's what I have so far for PGP 2.6.2 and Qedit 3.0. I don't
have TSE/TSE Jr., so I can't even tell you how compatible these macros
are (or aren't) with them, but they work in 3.0.  -- EXCEPT for one
thing, which I will now ask anyone reading this for advice on. After
using one of these macros, when you hit Alt-X to exit, Qedit prompts to
ask what filename you'd like to edit, as though you selected Load from
the File pulldown menu, but then subsequently ignores whatever you type.
Why is that? Can I get rid of it?
Here is one macro -- others for decrypting, sign-and-encrypt, etc. work
exactly the same in Qedit, the batch file is just a little different. If
you don't like the idea of having a batch file do the work I suppose
you could bring all of that into the macro, but I personally prefer to
have that in a batch file, to save macro space and because changes are
easier that way.
* (My Alt-P keys are assigned to PGP-related macros.)
* Title: PGP ClearSign Current File
*
* This macro saves the current file, and then calls the batch file
* qpgp-c.bat with the current filename as the first parameter, then
* reloads the file.
@p_c    MacroBegin
            SetScreenOff
            SaveFile
            Dos "qpgp-c.bat " CurrentFilename Return Return
            EditFile CurrentFilename Return Newfile Return
* end of macro
The batch file qpgp-c.bat looks something like this:
@echo off
::  Clearsign and then move the output back over the original file.
if exist %tmp%.\qpgp-c.$$$ del %tmp%.\qpgp-c.$$$
%pgppath%\pgp.exe -sat +clearsig=on %1 -o %tmp%.\qpgp-c.$$$
if exist %tmp%.\qpgp-c.$$$ move %tmp%.\qpgp-c.$$$ %1
pause
But the above macro assumes that you are going to be acting on text
you're already editing, not that you need a prompt for a new filename,
so for a uuencode macro you would need something a little different.
If the cursor was sitting on the word "filename" and you run this macro,
it should uuencode filename.zip and then load filename.uue into the
editor:
   MacroBegin
            AltWordSet
            MarkWord
            Copy
            DefaultWordSet
            Dos "uuencode " Paste ".zip" Return Return
            EditFile Paste ".uue" Return
But I just typed that in and didn't test it at all, so it may need minor
corrections..
Hope that helps, and feel free to make suggestions on the PGP macro.
Lee
--- Blue Wave/DOS v2.30
1:278/216)
---------------
* Origin: The Programmer's Mark * Brooklyn, NY, USA: 718-921-9267

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.