* 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * 袴袴� Macros to Reformat Blocks, Paragraphs and Documents, v1.4 팠袴� * 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * REFORM14.QM * * REFORM14.ZIP are macros to reformat QEDIT blocks, paragraphs, * and documents. Indented paragraphs and blocks are kept in their * original position. If other lines are further indented, this * indention is also maintained when AutoIndent is set ON. * * Added Alt_4 in v1.4 to remove asterisk and space in column 1. *----------------------- * 旼�@4 Removes asterisk and one space in column 1 *** New v1.4 * 넬�@1 Adds asterisk and space in front of marked block. * 냅-@2 Adds asterisk and space in front of marked block that * � IS a paragraph. * � @3 Formats a paragraph. (Macro has been around a long time) * � @5 Formats complete document with blank lines forming paragraphs * 쳐-@6 Adds asterisk and one space in column 1 * � @7 Deletes asterisk and any space at beginning of line * 읕�@8 Formats QMAC txtfile block with asterisk in column 1 * @9 Formats Block. Must position cursor at beginning of block * @0 Formats Paragraph Only. Keeps in original indented position. * * * If column width of the unformatted paragraphs and blocks are greater * than 80 columns, there must be enough blank lines for @8, 9 & 0 to * paste the reformatted text back and not overlap unformatted areas. In * otherwords, BE CAREFUL! * * NOTE: It is suggested that Alt_0 be used for "TECHNIQUE- ONLY". The * same thing is better accomplished by Alt_3. Be sure AutoIndent is set * ON. * * For faster macro execution, replace "C:" with your ram drive. * * * * VERSION HISTORY: * * 1.1 - added Alt_6,7 & 8 to format QMAC txtfiles * 1.1a- modified Alt_8,9 & 10 to get off screen-text in block * 1.2 - added Alt_5 to format entire document QUICKLY keeping * indented paragraph positions in place * Alt_4 to format entire document keeping indented * paragraph positions in place * Alt_3 to format paragraph only * - modified other macros to handle line widths to 512 * 1.2a- modified this documentation * 1.2b- Added @2 to make single column txtfile from * QMAC txtfile, v1.2b * 1.2c- changed 160 in @9 to 512 * 1.2d- @2 removed, now in COLUMN10.ZIP * - @4 removed * - added killfile @0 * - changed macro comments * 1.3 - added Alt_1 & 2 to put asterisk and space in front * of blocks and paragraphs * 1.4 - added Alt_4 to remove asterisk and space in column 1 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@1 Place asterisk and space in column 1 in front of marked block � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * * To run, first mark a block with markblockbegin and markblockend. The * cursor may then be positioned anywhere to run. After loading the * macro, press Alt and 1 at the same time. An asterisk and a space are * placed in column 1 in front of the marked block only. Marked block * does NOT have to be a paragraph as in Alt_2. * * @1 macrobegin cut * Get block to scrap editfile "C:$" return * load C:$ (temp file) quit * quit if in ring editfile return * reload paste * paste block to C:$ begfile * get to top of C:$ NEXT: * come here until done endline begline * check if line blank jfalse GETBACK: * if line blank, go to GETBACK "* " * put asterisk space in col 1 cursordown * move down to next line jump NEXT: * if not done go to NEXT GETBACK: * come here when done adding * begfile * go to begfile C:$ markblockbegin * get line 1 col 1 in block copy * get block w/asterisks to scrap quit * quit C:$ paste * Put block back marked makectrofscreen * better view END: * 37 bytes Mon 08-20-1990 21:02:06 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@2 Places an asterisk and space in front of block that IS a paragraph� *� and also in front of any paragraph that is NOT marked as a block � *� from the cursor to the end of the paragraph. � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * * To run, first either mark a paragraph as a block with markblockbegin * and markblockend or position the cursor at the beginning of a * paragraph in column 1. After loading the macro, press Alt and 2 at * the same time. An asterisk and a space are placed in column 1 in * front of the block or the paragraph from the cursor to the end * of the paragraph. Remember a paragraph is defined as having a * blank line at the beginning and end. * @2 macrobegin gotoblockbeg * go to block begin NEXT: * endline begline * end if line blank jfalse END: * if line blank, go to end "* " * put asterisk space in col 1 cursordown * move down to next line jump NEXT: * cycle until done END: * * * 18 bytes Mon 08-20-1990 22:19:35 * *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@3 Formats a paragraph. (Macro has been around a long time) � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * @3 macrobegin cursordown * move down one line prevpara * get to beginning of paragraph wrappara * reformat nextpara * go to begin next paragraph * * 8 bytes Wed 08-01-1990 10:47:36 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@4 Deletes asterisk and SINGLE space at beginning of line� *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * Use to remove asterisk and space inserted with Alt_6. Lines with * no asterisk are not changed. * @4 macrobegin START: unmarkblock * unmark any blocks begline * go to begline markcolumn * mark it cursorright * go to column 2 find "*" return * find asterisk space "BL" return * back in block only jfalse NEXT: * if found delch * delete asterisk delch * delete space NEXT: * come here if no astk in col 1 cursordown * down to next line begline * begline unmarkblock * unmark * * 25 bytes Tue 08-21-1990 13:30:16 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@5 Formats complete document with blank lines forming paragraphs � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * @5 MacroBegin unmarkblock * unmark begfile * get to file begin setrmargin "70" return * set new right margin FORMAT: * jfalse FINISH: * no more para? go to FINISH WrapPara * reformat NextPara * get to begin next paragraph jump FORMAT: * FINISH: * no more paragraphs setrmargin "80" return * reset right margin * * 26 bytes Wed 08-01-1990 10:47:50 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커 *�@6 Adds asterisk and one space at beginning of line � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸 * Useful in preparing txtfiles for QMAC. To run, just press Alt_6 and an * asterisk and blank space are inserted in column 1 and 2 in front of * any other text on the line. Use Alt_4 to remove asterisk and space * inserted with this macro. * @6 macrobegin unmarkblock begline "* " cursordown begline * * 12 bytes Mon 07-30-1990 11:03:14 *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@7 Deletes asterisk and any space at beginning of line � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * To run, press Alt_7, and the asterisk in column 1 on the cursorline * and all space up to the first word on the line is deleted. This * macros erase too much if there are two asterisks and no letters on * same line. * @7 macrobegin unmarkblock * get ready begline * go to begline delch * delete first asterisk endline begline * check if anything else on line jfalse NEXT: * if line blank, go to next markcolumn * otherwise, mark begline wordright * go to first word on line cursorleft * get cursor off word deleteblock * delete all space to beginline NEXT: * cursordown * cursordown and end * * 17 bytes Mon 07-30-1990 11:03:26 * * test line for Alt_7 * test line for Alt_7 * test line for Alt_7 * test line for Alt_7 * *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@8 Formats QMAC txtfile block with asterisk in column 1 � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * To run, position the 'cursor line' on the first line of the block to * reformat. Press Alt_9, then cursor down to bottom of block to * reformat. To reformat, press 'Enter' when the block is marked. This * macro differs from Alt_9 in that the block does not include the * asterisk and blank space; in Alt_9 the block starting postition is * selected by the starting position of the cursor line. This macro also * differs from Alt_0 which formats a paragraph from first blank line * which has no text or asterisk on line to last blank line. * * @8 macrobegin unmarkblock * get ready gotocolumn "512" return * get all block to format markcolumn * mark begin of block begline * start at line begin wordright * get to first word on line cursordown * position to cursor down makectrofscreen * see better pause * cursor to end, then 'Enter' markcolumn * mark end of block gotoblockbeg * Get to block begin JFalse END: * No block? End cut * Get into scrap editfile "C:$" return * load C:$ (temp file) quit * quit if in ring editfile return * reload paste * paste block to C:$ setrmargin "69" return ** * set rt margin to 69 ** change "69" as needed wrappara * format block setrmargin "80" return * reset rt margin to 80 begfile * get to block begin markcolumn * mark endfile * mark endblock gotocolumn "69" return ** * get all block marked ** change "65" as needed copy * get formatted block to scrap quit * quit C:$ pasteover * Put back formatted, marked makectrofscreen * better view END: * * 67 bytes Mon 07-30-1990 11:03:37 * 69 bytes Wed 07-30-1980 21:25:50 extra width in line 3 * 63 bytes Wed 08-01-1990 10:15:09 shrunk *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@9 Formats Block. Must position cursor at beginning of block � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * To run, position the 'cursor' at the beginning of the block * to reformat. Press Alt_9, then cursor down to bottom of * block to reformat. Press 'Enter' when the block is marked. * This macro differs from Alt_8 in that the starting position * of the block to be reformatted is selected by the starting * position of the cursor; in Alt_8 the block starting * postition is selected by the starting position of the cursor * line. @9 macrobegin unmarkblock * get ready gotocolumn "512" return * get all block to format markcolumn * mark begin of block prevposition begline prevposition * markcolumn * mark begin of block * gotocolumn "80" return * get all block to format makectrofscreen * see better cursordown * position to cursor down * makectrofscreen * see better pause * cursor to end, then 'Enter' markcolumn * mark end of block gotoblockbeg * Get to block begin JFalse END: * No block? End cut * Get into scrap editfile "C:$" return * load C:$ (temp file) quit * quit if in ring editfile return * reload paste * paste block to C:$ setrmargin "60" return ** * set rt margin to 60 ** change "60" as needed wrappara * format block setrmargin "80" return * reset rt margin to 80 begfile * get to block begin markcolumn * mark endfile * mark endblock gotocolumn "60" return ** * get all block marked ** change "60" as needed copy * get formatted block to scrap quit * quit C:$ pasteover * Put back formatted, marked makectrofscreen * better view END: * * 65 bytes Mon 07-30-1990 11:03:49 * 70 bytes Wed 07-30-1980 21:40:52 extra width in line 3 * 64 bytes Wed 08-01-1990 10:15:29 removed extra C:$ * This is a test block. To format, place the "cursor" on "t" in * in "this" on line 1. Then press Alt_9 and cursor down to * block end. When the block has been marked press * 'Enter'. * Asterisks need not be removed. *旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� *�@0 Formats Paragraph Only. Keeps in original indented position. � *읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� * To run, place cursor line anywhere in a paragragh, and press Alt_0. * This macro yields the same formatted paragraph as does Alt_b if the * right margin is set to 60 in the QEdit menu or in QCONFIG.DAT except * that the paragraph beginning is moved to column 1. This macro is the * starting point for putting together macros Alt_8 and 9. If there are * asterisks in column 1 they are also formatted as part of the * paragraph. * * @0 macrobegin unmarkblock * get ready cursordown * get into paragraph prevpara * get to paragraph begin markcolumn * mark column endpara * get to paragraph end gotocolumn "512" return * get all paragraph in block markcolumn * mark paragraph gotoblockbeg * Get to paragraph begin JFalse END: * No block? End cut * Get into scrap editfile "C:$" return * load C:$ (temp file) quit * quit if in ring editfile return * load new paste * paste block to C:$ setrmargin "60" return ** * set rt margin to 60 ** change "60" as needed wrappara * format block setrmargin "80" return * set rt margin to 80 begfile * get to block begin markcolumn * mark endfile * mark end block gotocolumn "60" return ** * get all block marked ** change "60" as needed copy * get formatted block to scrap killfile * killfile quit * quit C:$ pasteover * Put back formatted, marked makectrofscreen * better view END: * * 61 bytes Wed 08-01-1990 10:15:38 removed extra C:$ * 62 bytes Sat 08-04-1990 15:32:43 added killfile *****************************TEST PARAGRAPH*********************************** This is a test paragraph. First, be sure to ADD asterisks in column 1 if you intend to convert this txtfile to a macfile with QMAC. After converting to a QMAC macfile and before reformatting this paragraph **************REMOVE-THE-ASTERISKS***************. Place the cursor line anywhere in this paragraph, press Alt_4/5/0. Be sure AutoIndent is ON. ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** long line for test ========================================>> ******************************TEST PARAGRAPH*********************************** *..Tom Hogshead Tue 08-21-1990 13:23:52