* * CHANGE: AUTOEXEC SEARCH/REPLACE on several files. * * This macro, when placed first in a QMac macro file, and executed using * QEdit's /E command line option, will do a global search and replace on * any number of files loaded from the command line. * * To use: * o Make sure this macro is first in your macro file. * o Compile the macro file with QMAC: * * QMAC CHANGE.MAC CHANGE.QM B N * * o Run QEdit from the command line in this way: * * Q first.fil second.fil third.fil /Echange.mac * * QEdit will stop, ask for the search & replace parameters, * and then execute the change on all files you specified * to load. * * Of course you could specify wildcards such as *.* on the * command line too, as long as you have the QCONFIG option * "Load wildcarded filespecs from the command line?" set * to YES in your copy of QEdit. * * All files are saved to disk, and the editor exits * at the end. * * NOTE: You need the following to use this macro: * * QMac version 2.1 or higher * and * QEdit 2.1 *or* QEdit for OS/2 1.5 *or* QEdit TSR 1.1 * @F1 MacroBegin FindReplace Pause Return * Ask for the find text Pause Return * Ask for the replacement text Pause EndLine "GN" Return * Make sure No stop, and execute. File * Save this file to disk & go to next AGAIN: RepeatFind File * Repeat change & Save. Keep going. JTrue AGAIN * This jump is actually an "infinite * loop". The fact that File will * terminate the editor breaks the loop