home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
amac41.arj
/
SRL.QM
< prev
next >
Wrap
Text File
|
1991-06-20
|
5KB
|
100 lines
* SRL.QM June 20, 1991
* ----------------------------------------------------------------------
* @(7) - Search ONLY from command line
* -------------------------[ uses FGREP.COM ]---------------------------
*
* ** MUST BE FIRST MACRO FOR AUTO-EXECUTE SRL.BAT, SZ.BAT and SZR.BAT ***
* 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,
* SZ.BAT and SZR.BAT. See SZ.BAT and SZR.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
* ------------------ display "No found text" message -----------------*
cursordown cursorup * Test if any search text found
jtrue START: * If found, move on
MESSAGE: *
"No found text " * If not found, display this
jump END: * End macro if no found text
START: *
* ---------------------------- load files ----------------------------*
endfile * Get to end of file
LOADAGAIN: *
unmarkblock * Unmark last file name
find #42 "Fi" return "B" return* Find file name
jfalse MESSAGE: * No find ?, show message, end
wordright * Move to space
wordright * Move to file name
markcolumn * Mark it
endline * Get all name in block
copy * Copy file name to scrap
EditFile * Get ready to load
CurrentFilename " " * To force return *here*
Paste Return * Paste file name & do it!
cursorup * Go to next line
jfalse ENDLOAD: * No more filenames? Done load
jump LOADAGAIN: * Check again
ENDLOAD: *
* -------------------- initialize find for search --------------------*
editfile "c:\$" return * Load tempfile
find "S~~" return return ** Find S~~ in SET output |2.7
find "=" return 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 Escape * Initialize find for F4
END: *
* ------------------------------ reset ------------------------------*
defaultwordset * Set default
*
* 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
* (F4)
f4 RepeatFind
* (F5)
f5 PrevFile
* (F6)
f6 NextFile
* Tom Hogshead