* * SCRATCHS.QM -- A macro to auto-initialize a number of scratch buffers * on startup of QEdit 2.1, QEdit for OS/2 1.5, or QEdit TSR. * * Lets the user have a set of "standard" buffers, that contain the same * text every time, that are initialized upon entering QEdit with an * autoexecute macro. * * Modified to take advantage of JUMP commands---now handles an unlimited * number of Scratch Buffers. (Limited only by RAM). * * INSTRUCTIONS: See notes below on how to edit the macro to customize it * for the layout of your hard disk. * * Then, run QMAC to convert this to a binary macro: * * QMAC SCRATCHS.MAC SCRATCHS.QM B N * * You must use QMAC version 2.1 or higher to process this macro * * Then, use QEdit's /E command line switch to execute this * macro when you start up QEdit: * * Q /Escratchs.mac myfile.txt * * NOTES: (1) Edit where it says 'SCRATCHS.LST' to be the full path * specification of your scratch buffer file. That will insure * that this auto-execute macro will always be able to * find it, no matter what directory you are in. * (2) The format of the scratch buffer file looks like this: * 旼컴컴컴컴컴컴컴컴컴컴커 * �1 �<---- Scratch name on line by itself * 쿟ext of scratch1� �<---- Scratch text, followed by ASCII 254 * �2 �<---- Second scratch name * 쿟his is the text of �<---- Second scratch text * 퀂cratch number 2. � * � � Type the delimiter character * 쿙ote that it can � by pressing the ALT key, pressing * 쿬ontain any text � 2, 5 then 4 on the numeric keypad * 쿮xcept for an ASCII � with the ALT key held down, * �254. That is used � then releasing the ALT key. * 퀃o delimit the end � * 쿽f the scratch buffer � * 뇝 �<---- NOTE delimiter on line by itself * �3 � so scratch above will include line * 쿞cratch 3� � break * 읕컴컴컴컴컴컴컴컴컴컴켸 * (3) All scratch buffers are marked as CHARACTER marks. * * @f12 MacroBegin EditFile 'SCRATCHS.LST' * Load the scratchs file into QEdit Return BegFile BegLine * Go to the top of it MarkLine Cut * Get the scratch NAME, Cut to SCRAP MarkBlockBegin * Mark beginning of scratch TEXT Find #254 Return " " Return * Find the end of the scratch TEXT MarkBlockEnd * Mark the end. StoreScrBuff Paste Return * STORE the block to name in SCRAP DropAnchor PrevPosition * And delete this text to get it DeleteBlock DelLine * out of our way for now. CursorDown CursorUp * Only one line in file? JFalse NO_MORE: * If so, get out of here. SECOND_PASS: * Same thing, using RepeatFind BegLine MarkLine Cut MarkBlockBegin RepeatFind MarkBlockEnd StoreScrBuff Paste Return DropAnchor PrevPosition DeleteBlock DelLine CursorDown CursorUp * Are we at bottom of file? JTrue SECOND_PASS * If not, repeat. NO_MORE: Quit * Discard edited SCRATCH file * (Don't save the deletions)