Skip Navigational Links
LISTSERV email list manager
LISTSERV - COMMUNITY.EMAILOGY.COM
LISTSERV Menu
Log In
Log In
LISTSERV 17.5 Help - LSTSRV-L Archives
LISTSERV Archives
LISTSERV Archives
Search Archives
Search Archives
Register
Register
Log In
Log In

LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Menu
LISTSERV Archives LISTSERV Archives
LSTSRV-L Home LSTSRV-L Home

Log In Log In
Register Register

Subscribe or Unsubscribe Subscribe or Unsubscribe

Search Archives Search Archives
Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
Macro to execute commands from letters
From:
Harri Salminen <LK-HS@FINHUTC>
Reply To:
Distribution list for the Revised LISTSERV code <LSTSRV-L@FRECP11>
Date:
Tue, 02 Sep 86 18:33:28 FIN
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
 
I became frustrated with many subscriptions from Texas, Stanford, Washington
to our listserv in Finland for lists whose the original distributor is
much nearer in the States. I've now added the original description
along with original and possible other subscription addresses
to help people to find out from where the list actually comes and what's it
all about. Even I had trouble finding some of them which weren't on
arpanet list of lists or listserv groups. I think it would be
a good practise to put at least original addresses on the list comment.
    The situation inspired me to do a little xedit macro to execute
command lines from xedit like that "If you want to remove this person
give the command TELL LISTSERV DELete [log in to unmask]"
sentence on listserv letters. It saves a lot of typing and typos...
I'll include it here, so that nobody won't be bothered with requests.
I'll put it also on my File & Info server [log in to unmask]
 
Harri
 
 
 
--------------------- CUT HERE -------------- SNIP -------- SNAP ---------
/* DT XEDIT -- 01.09.1986 -------------------------------------------
   Do a command from a letter or any other file
   E.g. Execute from here a TELL LISTSERV HELP
   Syntax: DT <command_to_be_located|/>  (<Quote>
   -- Harri Salminen -- 01.09.1986 -------------- LK-HS at FINHUTC -- */
Arg cmd '('opts
opts = Strip(opts)
cmd = Strip(cmd)
/* This default is for listserv letters which inspired this macro */
If cmd = '' Then cmd = 'TELL '
IF cmd <> '/' Then Do /* Give the possibility to execute current line */
  'COMMAND TOP'
  'COMMAND CASE M I'
  'COMMAND LOCATE /'cmd'/'
  If rc <> 0 Then Call HandleError 'Command not found'
End
'COMMAND EXTRACT /CURLINE/'
Upper curline.3
/* If not especially demanded, remove disturbing quotes  */
If ^Abbrev('QUOTE',opts,1) Then
   curline.3=Translate(curline.3,'  ','''"')
cmdstart = Find(curline.3,cmd)
If cmdstart > 0 Then /* did the command really match? */
   cmdline = Strip(Subword(curline.3,cmdstart))
/* Let the user to determine what to do. Used also with / */
Else cmdline = Strip(curline.3)
/* Remove the preriod possibly closing the sentence on line           */
If Right(cmdline,1) = '.' Then cmdline = Left(cmdline,Length(cmdline)-1)
'COMMAND CMSG ' Strip(cmdline)   /* Let him/her do the final check */
Return
 
HandleError:
Arg msg
  'COMMAND EMSG 'msg
Exit   1

ATOM RSS1 RSS2

COMMUNITY.EMAILOGY.COM CataList Email List Search Powered by LISTSERV