Category : Word Processors
Archive   : AMAC43D.ZIP
Filename : SRL.QM

 
Output of file : SRL.QM contained in archive : AMAC43D.ZIP

* SRL.QM 5/18/92
* ----------------------------------------------------------------------
* @(7) - Search ONLY From Command Line With SRL.BAT and SZ.BAT
* -------------------------[ uses FGREP.COM ]---------------------------
* SRL.QM must be run from the command line, not while editing.
* Parameters may either be input from the command line or in response
* to query prompts. Macro @7 is the auto-execute macro for SRL.BAT,
* and SZ.BAT. See SZ.BAT for instructions to search/replace files
* within ZIP files.

* To search for text in non-zip files type SRL at the command line and
* answer prompt for search text. After the files containing the search
* text are loaded, press F4 to highlight first occurence of search
* text. Press F6 then F4 to highlight first occurence of search text in
* first file containing search text. IT CANNOT BE RUN WHILE EDITING!

* An alternative to using the batch file SRL.BAT is to use the
* following PCED synonym instead:
*
* SYN SRLFG 'echo off^break on^FGREP.COM -fl "&A" @SRCH-FG.LST >c:\!
* ^Q. c:\! /Esrl.mac^break off^echo on'
*
* Just add this synonym to the bottom of your synonym file on one line,
* or type CED SYN SRLFG 'echo ...............'.
*
* To run using PCED, type SRLFG [search text] at the command line.
*
* When finished running with the batch file or PCED, the following
* files are loaded for viewing or editing:
*
* Window 1 -list of files found & search text (output from FGREP.COM)
* Window 2...n+1 -files containing search text, n = (# files found)
*
* Temporary file names are:
*
* c:\$.ql List of files found & search text (output from FGREP.COM)
* c:\! Same as c:$.ql
* c:\$ Output of Dos SET
*
@7 macrobegin altwordset * For all file names
cursordown cursorup
jtrue START * Test if any search text found
* ------------------ Display "No found text" Message -----------------*
MESSAGE:
"No found text "
jump END * If not found, display this
* ---------------------------- Load Files ----------------------------*
START:
endfile
LOADAGAIN:
unmarkblock * Unmark last file name
setscreenon setscreenoff * To reduce flashing *|
find
#42 "Fi" return
"B" return * Find file name
jfalse MESSAGE * No find ?, show message, end
wordright wordright
markcolumn endline copy * Copy file name to scrap
EditFile
CurrentFilename " "
Paste Return * Load file
cursorup
jtrue LOADAGAIN * Test if more filenames? *|
* -------------------- Get Search Text To Scrap --------------------*
editfile "c:\$" return * Load set output file
find
"S~~" return
delline return ** Find S~~ in SET output *|
find
"=" return
delline return * Move to = *|
cursorright * Move first character
markcharacter * Mark it
endline * Move to end of text
copy * Copy search text to scrap
killfile quit * Kill/quit temp for next time
Find
paste return
"i" return begfile * Initialize find for F4 *|
END:
defaultwordset
*
* 83 bytes Sat 02-09-1991 10:47:23
* 107 bytes Thu 04-25-1991 12:04:27 added "No found text" message
* added find initialize for search
* changed "c:" to "c:\"
* 110 bytes Tue 04-30-1991 22:11:07 changed initialize find routine
* 114 bytes Wed 04-15-1992 16:46:20 (TH @7, for QEdit v2.15)

* (F4)
f4 RepeatFind

* (F5)
f5 PrevFile

* (F6)
f6 NextFile

* Tom Hogshead