From: CSBVAX::MRGATE!info-vax-RELAY@KL.SRI.COM@SMTP 18-JUL-1988 04:37 To: ARISIA::EVERHART Subj: Re: Automatic emblems and signatures in MAIL Received: from CUNYVM.CUNY.EDU ([128.228.1.2]) by KL.SRI.COM with TCP; Wed, 13 Jul 88 07:25:18 PDT Received: from gallua.bitnet by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 7961; Wed, 13 Jul 88 06:44:00 EDT Date: Tue, 12 Jul 88 13:47 EST From: "Kevin Cole at Gallaudet U. Washington DC" Subject: Re: Automatic emblems and signatures in MAIL To: info-vax@kl.sri.COM X-VMS-To: IN%"info-vax@kl.sri.com" Date sent: 12-JUL-1988 13:15:58 Several people have asked me about automatic emblems. I'm not saying this is the best way to do things... I'm just saying it's the way I do things. Seems to work OK for me. Well, here's how I do it: 1) Create a file with your particular emblem or signature in it. (I called mine SIGNATURE.TXT.) 2) Add the following lines in your LOGIN.COM: $ DEFINE/NOLOG MAIL$EDIT SYS$LOGIN:MAILEDIT.COM $ MAIL :== MAIL/EDIT=(SEND,REPLY=EXTRACT,FORWARD) 3) Cut out the following two files (MAILEDIT.COM and MAILEDT.INI) -------------------- MAILEDIT.COM ------------------------- $ SET TERM/NOBROADCAST $ DEFINE /USER SYS$INPUT 'F$TRNLNM("SYS$OUTPUT")' $ IF P1 .EQS. "" THEN GOTO NOINPUT $ EDIT /COMMAND=SYS$LOGIN:MAILEDT.INI/OUTPUT='P2' 'P1' $ SET TERM/BROADCAST $ EXIT $NOINPUT: $ EDIT /COMMAND=SYS$LOGIN:MAILEDT.INI 'P2' $ SET TERM/BROADCAST $ EXIT ----------------------------------------------------------- -------------------- MAILEDT.INI -------------------------- SET CURSOR 0:20 SET SCREEN 80 SET WRAP 79 SET SEARCH BEGIN SET ENTITY WORD '^H^I^J^K^L^M !"#$%&''()*+,-./:;<=>?@[\]^_`{|}~' SET WORD NODELIMITER DEFINE KEY GOLD 14 AS "5SHL." DEFINE KEY GOLD 15 AS "5SHR." DEFINE KEY GOLD D AS "DATE." C; ER -L 32000(62ASC -2L) ER EX INC SYS$LOGIN:SIGNATURE.TXT F BEG C; IDate sent: ^Z DATE ^M EX SET MODE CHANGE ----------------------------------------------------------- NOTE: Change the ^H^I^J^K^L^M to control characters in the SET ENTITY command. Change the ^Z to control-Z (but NOT the ^M) in the second last line. Explaination: The above does a bit more than what is asked for... The reason I spawn instead of using callable EDT or TPU is because I prefer to turn off broadcasts while I'm editing, and because the COM file runs a non-standard INI file. The special INI file is what adds the emblem/signature. It also does a few other handy things like adding the time the message was sent, and adding the ">" character to the beginning of every old line in a reply. (That's a trick I learned from someone on this list ages ago.) The guts are in the last five lines. First we move to the end of the buffer (ER). Backup one line (-L). Insert a ">" (62ASC) and go to previous line (-2L) 32000 times. When we've finally added as many ">" as we can, go back to the end of the buffer (ER). Add the signature file. (INC SYS$LOGIN:SIGNATURE.TXT). Go back to the top of the file (F BEG) and add the current time and date (IDate sent: ^Z DATE ^M EX). Lastly give control back to the sender (SET MODE CHANGE). Hope this helps. ------------------------------------------------------------------------------- Kevin Cole | Bitnet: CADS_COLE@GALLUA.BITNET Center for Assessment and | or Demographic Studies (CADS) | KJCOLE@GALLUA.BITNET Gallaudet Research Institute (GRI) | UUCP: ...!psuvax!gallua.bitnet!kjcole Washington, D.C. 20002 | CompuServe: 76167,1406 (202) 651-5575 | ------------------------------------------------------------------------------- "Hey Rocky! Watch me pull a rabbit out of my hat!"