| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Using the output of a program as a signature |
sr>>> Is this possible that I can use the output of an application,
sr>>> uptime etc for adding to a sig for Timed
ml>> if you use an external editor and process the message file
ml>> appropraitly before returning to TimED, yes... its how i add the
ml>> ^aMOOD control line (and some others) as well as the chosen
ml>> signature to messages i write on TimED...
sr> That would be a lot of work for what I would need and in
sr> echomail Timed already has the Origin added.
what lot of work? here's how my DOS and OS/2 flavors of TimED are setup...
[note: these are the last of the originals released by Art.]
DOS Editor [PATH]\eq.bat
OS2 Editor [PATH]\eq.cmd
DOS exesign [PATH]\mood.bat
OS2 exesign [PATH]\mood.cmd
/* ok, so i was wrong... i put the mood stuff in via the signing routine...
in any case, it can also be done in the editor script... i use QEdit for my
external editor... my system also uses the 4DOS/4OS2 command interpreter
replacement... i've used [PATH] in the following to indicate where the path
info goes without listing my own system's path layout... all editing files
and temp files and such are stored in the timed directory since that's
where timed puts them when we start editing... */
{at}echo off
::
:: save a copy of the message in case needed later
:: (ie: during editing if yo really mess up, (re)import
:: it and start over)
::
copy [PATH]\timed.msg [PATH]\msg.sav > nul
::
:: del temp and footer files
::
del [PATH]\tmp_msg.txt [PATH]\footer.txt > nul
::
:: load qedit with some macros to preprocess the message
:: before we actually start editing... one of these saves
:: the existing tearline and footer stuff to tmp_msg.txt
:: for inclusion later so we don't have to deal with that
:: stuff while we are editing the message.
::
q.exe [PATH]\timed.msg -e[PATH]\test1.mac -l[PATH]\sigs.mac
::
:: get ready to perform the closing functions after we exited
:: editing the message...
::
cls
::
:: ask about using pgp on the message
::
:doPGP
color cyan on black
inkey /K"YN" Add PGP information? [Y]es or [N]o %%action
color white on black
iff "%action" == "Y" then
color cyan on black
inkey /K"CTFP" [C]lear Signed, Encrypt [T]o/[F]rom or
[P]ublic Key? %%action
color white on black
ifF "%action" == "P" then
::
:: append public key file to message
::
copy [PATH]\timed.msg+[PATH]\mflkey.asc [PATH]\timed.msg > nul
endiff
iff "%action" == "C" then
::
:: clearsign message
::
pgp -ast +clearsig=on [PATH]\timed.msg > nul
move [PATH]\timed.asc [PATH]\timed.msg > nul
endiff
iff "%action" == "T" then
::
:: encrypt message to specific key holder
:: must use PGP methods of specifying key holder ID
::
input /C /E ID to encrypt TO: %%encto
pgp -e [PATH]\timed.msg %encto
move [PATH]\timed.asc [PATH]\timed.msg
endiff
iff "%action" == "F" then
::
:: encrypt message FROM self with secret key
:: defaults to "double" encryption
:: TO specific keyholder
:: FROM self
:: leave blank and hit enter on "ID to" to
:: only encrypt FROM self and TO: ALL
::
:: put your keyID in the encfr line!
::
set encfr=0xFFFFFFFF
input /C /E ID to encrypt TO: %%encto
input /C /E ID to encrypt FROM: %%encfr
pgp -es [PATH]\timed.msg %encto -u %encfr > nul
move [PATH]\timed.asc [PATH]\timed.msg > nul
endiff
goto doPGP
endiff
color cyan on black
::
::ask which signature to append to message...
::
inkey /K"YN" Add Echomail Signature? [Y]es or [N]o %%action
color white on black
iff "%action" == "N" then
echo. >>[PATH]\timed.msg
else
color cyan on black
echo Signature List
echo.
echo [N]ormal
echo [U]senet
echo [P]GP
echo [1] a moderator, RA_SUPPORT
echo [2] a moderator, RA_UTIL
echo [3] a moderator, RA_MULTI
echo [4] a moderator, RA_32BIT
echo [5] a moderator, PASCAL_LESSONS
echo [6] a moderator, OS2DOSBBS
echo.
inkey /K"123456NUP" Selection? %%action
color white on black
if "%action" == "N" copy
[PATH]\timed.msg+[PATH]\ftr_nrm.txt [PATH]\timed.msg > nul
if "%action" == "U" copy
[PATH]\timed.msg+[PATH]\waldo.sig [PATH]\timed.msg > nul
if "%action" == "P" copy
[PATH]\timed.msg+[PATH]\ftr_pgp.txt [PATH]\timed.msg > nul
if "%action" == "1" copy
[PATH]\timed.msg+[PATH]\ftr_mod1.txt [PATH]\timed.msg > nul
if "%action" == "2" copy
[PATH]\timed.msg+[PATH]\ftr_mod2.txt [PATH]\timed.msg > nul
if "%action" == "3" copy
[PATH]\timed.msg+[PATH]\ftr_mod3.txt [PATH]\timed.msg > nul
if "%action" == "4" copy
[PATH]\timed.msg+[PATH]\ftr_mod4.txt [PATH]\timed.msg > nul
if "%action" == "5" copy
[PATH]\timed.msg+[PATH]\ftr_mod5.txt [PATH]\timed.msg > nul
if "%action" == "6" copy
[PATH]\timed.msg+[PATH]\ftr_mod6.txt [PATH]\timed.msg > nul
endiff
color cyan on black
::
:: ok, done with all that... do we really want to send the
:: message or not? we may have aborted at any part during
:: the above...
::
inkey /K"NY" Send Message [Y]es or [N]o? %%action
color white on black
iff "%action" == "N" then
rem copy [PATH]\msg.sav [PATH]\timed.msg
del [PATH]\timed.msg > nul
goto end
endiff
::
:: we're saving the message so let's get the footer stuff
:: from tmp_msg.txt back in place since we do it ourselves
:: the way we want it...
::
iff %{at}eval[%{at}lines[[PATH]\tmp_msg.txt]] == 1 then
echo %{at}line[[PATH]\tmp_msg.txt,%{at}eval[%{at}lines[[PATH]\tmp_msg.txt]]]
>>[PATH]\footer.txt
endiff
iff {at}FILESIZE[[PATH]\tmp_msg.txt,b] LE 2 then
goto tmsg_jump
endiff
iff %{at}eval[%{at}lines[[PATH]\tmp_msg.txt]] == 2 then
echo %{at}line[[PATH]\tmp_msg.txt,%{at}eval[%{at}lines[[PATH]\tmp_msg.txt]-1]]
>>[PATH]\footer.txt
echo %{at}line[[PATH]\tmp_msg.txt,%{at}eval[%{at}lines[[PATH]\tmp_msg.txt]]]
>>[PATH]\footer.txt
endiff
::
:tmsg_jump
::
:: line.txt is the ~~ stuff to keep TimED from reformatting
:: the message and messing up anything that we may have put
:: in in a special format (ie: columnar or chart style, pgp, etc)
::
copy [PATH]\line.txt+[PATH]\timed.msg+[PATH]\footer.txt [PATH]\timed.tmp > nul
move [PATH]\timed.tmp [PATH]\timed.msg > nul
:end
/* and here's mood.bat... its very simple and may be usable
to do what you want. just remember to exesign each and every
message you want this stuff put on... */
{at}ECHO OFF
CLS BRI WHITE ON BLUE
COLOR BRI WHITE ON BLUE
IF NOT EXIST TIMED.MSG GOTO EXIT
:ENTER_DATA
SCRPUT 3 8 BRI YELLOW ON BLUE þ M O O D þ S E L E C T O R þ T I M E D þ
SCRPUT 5 25 BRI RED ON BLUE SELECT YOUR MOOD
:AGAIN
SET SELECTED=%{at}SELECT[MOOD.DAT,8,23,16,53,Select your Mood]
SET SELECTED=%{at}TRIM[%SELECTED%]
IF "%SELECTED%" == "" GOTO AGAIN
SET LINE_COUNT=%{at}LINES[TIMED.MSG]
SET LUNO_O=%{at}FILEOPEN[TIMED.MSG,Read]
SET LUNO_N=%{at}FILEOPEN[TIMED.$$$,Write]
SET DONE=FALSE
SET RETURN_CODE=%{at}FILEWRITE[%LUNO_N%,{at}MOOD: %SELECTED%]
DO COUNT = 0 TO %LINE_COUNT% BY 1
SET LINE=`%{at}FILEREAD[%LUNO_O%]`
SET RETURN_CODE=%{at}FILEWRITE[%LUNO_N%,%LINE%]
ITERATE
ENDDO
SET RETURN_CODE=%{at}FILECLOSE[%LUNO_N]
SET RETURN_CODE=%{at}FILECLOSE[%LUNO_O]
IF EXIST TIMED.MSG DEL TIMED.MSG >NUL
REN TIMED.$$$ TIMED.MSG >NUL:
:EXIT
maybe this stuff will give you and others some ideas??
now that i really look at this after all these years, seems to be a lot
more work than is needed... one should be able to select the mood they want
in the ^aMOOD: "control line" and stuff that into a temp file and
then copy the temp file and the message file together... note that in the
above {at}MOOD: should really have the actual ^A character in place of the
{at}... this editor converted it for posting...
the ^aMOOD: stuff came from a posting by francois blais on jan 31, 1996
right here in this very echo OB-)
)\/(ark
* Origin: (1:3634/12)SEEN-BY: 206/0 633/267 270 @PATH: 3634/12 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
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™.