home *** CD-ROM | disk | FTP | other *** search
- /** getall.rexx
- *
- * This function edits all specified files in which a certain
- * string occurs, and puts the cursor at the first occurrence.
- *
- **/
- parse arg fn ss
- ss = strip(ss)
-
- options prompt "Next? "
-
- if ss = "" then do
- say "Usage: getall <wildcards> <search string>"
- exit
- end
-
- if ~show('l','rexxarplib.library') then addrexxlib
-
- 'search 'fn' 'ss' quiet | execio stem files.'
-
- if files.0 = 0 then do
- call postmsg(100,100,"No files found")
- call delay 120
- call postmsg()
- exit
- end
-
- do i = 1 to files.0
- if files.i = "" then leave
-
- if i ~= 1 then do
- call open(PULLWIN,"con:100/100/130/50/GetAll")
- call writech(PULLWIN,"Next? ")
- yesno = readln(PULLWIN)
- if left(yesno, 1) = 'n' then do
- say "Aborted"
- exit
- end
- call close(PULLWIN)
- end
- call setenv('Search', ss)
- 'e 'files.i' startup getall.txed sticky'
- end
-
- call postmsg(100,100,"Done")
- call delay 120
- call postmsg()
-
- exit
-