* PAUSE11.QM * Macros To Single Step Macros * Written by Tom Hogshead * With Contributions by John Goodman * 8/9/91 * * @(1) Single Step Macro By Adding PAUSE Lines Between Macro Commands |chg * * @(2) Remove PAUSE Lines Between Macro Commands Placed With @1 * * @(3) Macro @2 Paused With @1, Removes PAUSES "Single Step" * * @(4) Adds A PAUSE*+ Above The Cursor Line, or Comments/Uncomments * a PAUSE*+ Line * * (Description) * (AMACxx).ZIP * (Problems) or suggestions? * (Version) History * *-- eoi * (Description) * ------------- * PAUSE11.QM macros make any portion of a QEdit macro marked as a * block a "single step" macro by entering a "pause" before the each * macro command in the block. Macros are included to revert a single * step macro to normal operation. *  * (AMACxx).ZIP Sources * -------------------- * AMACxx.ZIP is a collection of QEdit macros I have put together. * Many I have written, and John Goodman has recently * contributed extensively to this effort. As of this writing, the * latest version is xx=38 with new macros and subsequent changes in * AMAC-x.ZIP(x = K) Program files used with these macros are in * AMAC-PRG.ZIP. AMACxx.ZIP is (uploaded) to CompuServe IBMAPP Lib * 0 (Lib 1 after 30 days in Lib 0), Exec-PC (414-789-4210), and * SemWare (404-641-8968). All are PC "Pursuitable" except * CompuServe. *  * (Problems) or suggestions? * -------------------------- * Any problems or suggestion, I would like to hear from you. I * can be reached daily on either SemWare, Exec-PC or NewWare. I * check CompuServe only once a month. I will also try to include * your useful macros in AMAC if you send them to me. Hope you find * some of these macros useful. I have enjoyed writing them. Thanks. * Tom Hogshead *  * ---------------------------------------------------------------------- * @(1) Single Step Macro By Adding PAUSE Lines Between Macro Commands * ---------------------------------------------------------------------- * This macro makes any portion of a macro marked as a block a 'single * step' macro by entering a 'pause' before the each macro command in * the block. To run, place the cursor line on the first line of the * block, execute the macro, and at the pause, cursor down to the * desired end of block and hit Enter. Alternatively, the block may be * marked (open or closed) before execution as either a line, column or * character block. * Insert may be ON or OFF. Lines containing a colon are assumed Labels * and are not paused. Macro stops if any blank line exists in block. * Lines containing Pause with capital 'P' will not be paused, but pause * without capital P will be paused. User inserted pauses should have * the 'P' capitalized to not be paused with @1. Lines containing * PAUSE*+ will not be paused. Conditional lines containing jtrue, * jfalse and jump are assumed to be followed on the same line by a * Label *with* a colon and are not paused, e.g. 'jtrue LABEL1:' is not * paused, but 'jtrue' with the label on the following line is. @1 macrobegin * ------- Check and finish marking line or block if not marked -------* gotoblockend * Test if block is closed jtrue OK: * If closed, go to OK markline * If not closed, close or start mark gotoblockend * Move to end of block if closed or stay * where we are if block not yet closed jtrue OK: * If block is now closed, we started with * an open block makectrofscreen * Center for viewing Pause * Pause to mark end of block markline * Mark end of block OK: * * ------------------ Insert blank line under block ------------------* cursordown * Move down to line under block insertline * Add blank line * ------------------ Insert message on top of block ------------------* BEGIN: * gotoblockbeg * Go back to block begin unmarkblock * Un mark block begline * Start message in col 1 insertline * Insert blank line on top of block for msg #42 * Insert star in col 1 cursorright * Move right one space "-" 8 * Insert '-' 9 times "BEGIN PAUSE" * Insert begin message wordleft * Move cursor to P markcharacter * Start character marking endline * #42 "+" * Inert '*+' storescrbuff "1" return * Store 'PAUSE_*+' to scratch buff 1 markline * Markline for copy copy * Copy cursordown * Move to first line in block cursordown * Move to second line in block * --------------------- Test if at end of block ---------------------* LOOP: * Come here to loop unmarkblock * Unmark line/block endline begline * Test if line is blank jfalse END: * If so, macro ends on first blank line * --------------- Test if star is first character in line-------------* insertline * Insert temp line nextpara * Move to first character of line below cursorup delline * Delete temp line scrollup * Re-position screen because of delete cursorright * Move right one space off first character markline * Mark this line to begin all tests FIND #42 return "LB" return * Search for star, Local Backwards jtrue 1: * If false, no comment in line, go pause * ----------- Test if conditional statement or label (colon) -----------* begline * In case previous line contained comments Find #58 return * Search for colon #58 "L" return * in this line only, "Local" Jtrue 1: * If colon found, line assumed to be a * conditional statement or Label, bypass * -------------------- Test if line is already a 'pause' -------------* begline *ELSE line has no colon, position to Test Find #80 "ause" return * Test if line is already a paused "WL" return * Finds whole word pause, with cap P jtrue 2: * If found, line is a pause, bypass this * and next line * -------------- Test if line is already paused with @1 --------------* begline *ELSE line has no colon, position to Test Find "E" "*+" return * Test if line is already paused with @1 "L" return * Finds 'PAUSE_*+', all caps jtrue 2: * If found, line was paused with @1, * bypass this and next line * --------------------- Test if line has Repeat_Cmd --------------------* begline * In case previous line contained comments Find "atcm" return * Search for Repeat_Cmd "IL" return * in this line only, Local, Case Insensitive Jtrue 1: * If found, line, bypass this line * ----------------------- Insert 'pause' line -----------------------* 3: * insertline * Need to insert a blank line to 'pause' Gotocolumn "25" return * Go to column 25 (change as you like) getscrbuff "1" return * Insert needed 'PAUSE_*+' from scratch 2: * cursordown * Bypass line, move down to next line 1: * cursordown * Move down to next line to test if blank endline begline * Test if line is blank jfalse END: * If so, blank line ends macro jump LOOP: *ELSE loop again END: * End macro * -------------------- Insert message under block --------------------* paste * Paste Begin message here endline * Move to eol wordleft wordleft * Move to B in BEGIN delrtword * Delete BEGIN splitline * In case Insert Off |a "END " * BEGIN now replaced with END, * Insert must ON joinline * Re-join |a unmarkblock * * * 241 bytes Wed 05-29-1991 21:20:35 (TH to JG) * 207 bytes Tue 06-04-1991 00:39:02 (TH implemented JG suggestions) * 194 bytes Tue 06-04-1991 10:38:13 (TH shortened test for comments) * 194 bytes Sun 06-23-1991 20:59:30 (TH changed find first char on line) * 194 bytes Mon 07-08-1991 17:16:28 (TH @1) * 196 bytes Fri 08-09-1991 02:01:44 (TH @1, in pause11.qm, Ins Off Ok |a ) *  * ---------------------------------------------------------------------- * @(2) Remove PAUSE Lines Between Macro Commands Placed With @1 * ---------------------------------------------------------------------- * This macro removes all and only pauses placed with @1 from the cursor * line to the next blank line. If no PAUSE_*+ are found after starting * this macro, the macro deletes the next blank line it finds and stops. * Just beware. @2 macrobegin LOOP: endline begline * Test if line has text | jfalse DELLINE: * If blank, END macro | unmarkblock markline * Markline for Find | Find "E" "*+" return * Search for 'PAUSE_*+' "L" return * Finish prompt | jfalse NOPAUSE: * If not found, go to NOPAUSE delline *ELSE if found, delete pause line begline * Re-position for Find on current line jump LOOP: * Loop again NOPAUSE: * endline begline * Test if line has text jfalse DELLINE: * If blank, delete line and end macro unmarkblock * Only for better screen appearance | cursordown *ELSE cursor down to next line JFALSE END: * End macro if can't cursor down bottom line jump LOOP: * Loop again DELLINE: * delline * Delete blank line END: * unmarkblock * | * * 36 bytes Tue 06-04-1991 00:26:13 (TH) * 44 bytes Tue 06-04-1991 10:14:23 (TH |) * 45 bytes Mon 07-08-1991 17:16:43 (TH @2) *  * ---------------------------------------------------------------------- * @(3) Macro @2 Paused With @1, Removes PAUSES "Single Step" * ---------------------------------------------------------------------- * This macro is macro @2 paused with @1. @3 macrobegin * --------BEGIN PAUSE*+ begline * In case cursor past 'PAUSE_*+' on line PAUSE*+ LOOP: PAUSE*+ Find "E" "*+" return * Search for 'PAUSE_*+' (all capitals) PAUSE*+ delline return * Finish prompt jfalse NOPAUSE: * If nor found, go to NOPAUSE PAUSE*+ delline *ELSE if found, delete pause line jump LOOP: * Loop again NOPAUSE: * PAUSE*+ endline begline * Test if line has text jfalse DELLINE: * If blank, delete line and end macro PAUSE*+ cursordown *ELSE cursor down to next line JFALSE END: * End macro if can't cursor down bottom line jump LOOP: * Loop again DELLINE: * PAUSE*+ delline * Delete blank line END: * * --------END PAUSE*+ * 42 bytes Fri 05-31-1991 22:13:40 (TH) * 42 bytes Mon 07-08-1991 17:16:52 (TH @3) *  * ---------------------------------------------------------------------- * @(4) Adds A PAUSE_*+ Above The Cursor Line, or Comments/Uncomments * a PAUSE_*+ Line * ---------------------------------------------------------------------- * This macro either adds a PAUSE_*+ above the cursor line, or * comments/ uncomments a PAUSE_*+ line. @4 macrobegin unmarkblock * begline * markline * Find "*" " P" return * Test if pause commented "L" return * Locally jfalse DO: * If false, commented pause does not exist delch *ELSE, it exists, delete star shiftright * Put pause back in original position jump END: * END macro DO: * Find "E" "*+" return * Test if 'pause' with '*+' exists "L" return * Locally jfalse ADD: * If it does not, we must add pause wordleft *ELSE 'pause' with '*+' exists shiftright * Shift it and line right one space "*" * Insert star shiftleft shiftleft * Put back in original position if Insert ON jump END: * END macro ADD: * insertline * Insert line above for 'pause' Gotocolumn "25" return * Go to column 25 (change as you like) "PAUSE" "*+" * Insert 'pause' with '*+' cursordown * Cursor down to line we just paused END: * begline * unmarkblock * * * 73 bytes Tue 06-04-1991 02:04:12 (TH) * 73 bytes Mon 07-08-1991 17:17:12 (TH @4) * (Version) History * ------------------ * 1.0 - Initial release. 7/10/91 * 1.1 - Modified @1 for Insert On or Off. 8/9/91 * * * *