From: fred.holmes@mix.cpcug.org (FRED HOLMES)
I need a couple of clues on how to run a process successively on
all of the files in the editing ring. If BufferId were a simple
integer from 1 to n, I would write something like this.
/* TSEFIND.S
Clip the tse articles out of the MIX capture files
*/
String S01[25]="tsepro"
String Outfile[20]="TSEPRO.LOG"
Integer n=0
Integer i
Proc Main()
GoToBufferId(1) // be sure you are at the beginning.
PrevFile() // go to last file in ring
n=GetBufferId() // get the Buffer ID of the last file
for i = 1 to n // for each file in the ring
GoToBufferId(n) // perform successively on each file.
Begfile() // from here to endfor works just fine.
Begline()
if lFind(S01,"i") // Don't do anything if "tsepro" nf.
Repeat
lFind(S01,"i") // Look for tsepro message indicator
lFind("^Date:","xb") // Look for beginning of message
Markline()
Down()
lFind("{Date:}|{Scanning}|{(H)elp}","x") // end of msg
Saveblock(Outfile, _append_) // save message to Outfile
UnMarkBlock()
Editfile(Outfile) // Put a separator in Outfile
EndFile()
BegLine()
AddLine()
InsertText(">>",_insert_)
SaveFile()
AbandonFile()
Until Not lFind(S01,"i")
else
endif
endfor
end // Proc Main()
/*
The process for clipping messages out of one file works just
fine. But I don't see any syntax for running the proc on a set
of files in the ring. Maybe there is an example I can follow
somewhere in the macro libraries. ???
Yes, I do want all of the writes to the Outfile to be written to
a single file for all of the input files.
Thanks in advance for your help.
Fred Holmes fred.holmes@mix.cpcug.org
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|