home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
amac41.arj
/
RING12.QM
< prev
next >
Wrap
Text File
|
1991-08-26
|
47KB
|
966 lines
* RING12.QM, v 1.2a
* Macros To Select and Load Files In QEdit Ring
* Written by Tom Hogshead
* 8/24/91
*
* Macros To Be Run While Editing Only
* ============================================================
* @(f2) Save List of Files In Ring, Restore With @f1 and/or RING.BAT |new
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
*
* @(2) Select and Load Files From a PickList of All Files In Ring, |chg
* File Edit Statuses Are Unchanged
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
* (Written by Tom Hogshead and John Goodman)
*
* @(3)² Select and Load Files From a PickList of All Files In Ring |chg
*
* @(4)² Select and Load Files From a DOS "DIR" Picklist, User Inputs
* File Pattern To Make PickList
*
* @(5)² Select and Load Files From a PickList Made Using Directory
* Extended, DX.EXE, User Selects Desired File Extension and
* Sort Options From a Pre-Made File "FILE.SRT" To Make PickList
* @(6)² Select and Load Files From a PickList Made Using Directory
* Extended, DX.EXE, User Inputs File Pattern and Sorting Options
* To Make PickList
*
* @(8)² Load While Editing All Files In Pre-Made List of Files,
* Modification of @1
*
* @(9)² Begin or Continue Emulation of PC Magazine's FILECTRL.COM
* After Macros @1 to @7 Have Been Stopped
*
*
* Key Subfile Macros To Be Run From Command Line Only
* ====== ========= =====================================================
* @(f1) {e:\up\ring@f1}
* Load Previously Saved List of Files Made With @f2 |new
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM After Loading)
*
* @(7)² {e:\up\ring@7} |1.2a
* Load At Command Line All Files From a Pre-Made List of Files,
* Modification of @1
*
* @(0)² {e:\up\ring@0}
* Load At Command Line First File In a Pre-Made List of Files,
* Faster Version of @1, Does Not Enter All Files In Ring
*
* @(1) {e:\up\ring@1}
* Load At Command Line All Files From a Pre-Made List of Files,
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM After Loading)
* (Written by Kyle Watkins of SemWare)
*
* Other Macros
* ==============
* @(F6) Makes Sorted DIR List of File Names in Conventional "8.3" Format
* NO SPACES, with Date and Time, like this:
* FILE25.QM 64795 6-23-91 4:12a
*
* @(r) Reset to DefaultWordSet After Macros Complete
* @(h) Jump From Index Line To Locate Macro or Item In Document Below
*
* Misc
* ======
* (Description)
* (Macros)
* (Autoexecute) Start up Macros
* (Syntax) to autoexecute macros
* (Locate) macros and items in file from Index, how to
* (FILECTRL).COM from PC Magazine
* (Directory) Extended DX.EXE
* (AMACxx).ZIP
* (Uploaded) sources for AMACxx
* (NEWKEY) macro to close windows and set "DefaultWordSet"
* (RING_TST.QM) tests for optimum ring loop technique
* (Problems) or suggestions?
* (Version) History
*
* ---------
* ( )² Macro keys with superscript² denotes emulation of FILECTRL.COM
*
*-- eoi
* (Description):
* ---------------
* QEdit macros in RING12.QM emulate PC Magazine's FILECTRL.COM enabling
* the user to know what files are in the ring and in what order, and
* give the capability to load a file in the ring *without* having to
* nextfile through the ring. Files may be loaded from a list of files
* at the command line or from a PickList of files in the ring while
* editing. Directory Extended DX.EXE is required for some macros.
* Comparisons are made in (RING_TST.QM) of speed, versatility and the
* limitations of different macro techniques to loop through all files
* loaded in the ring, perform any desired function on each file in the
* ring, and end in the file we started in.
* (Autoexecute) Start up Macros:
* -----------------------------
* Macros @f1, @1, @0 and @7 must be the first macros in the file to
* autoexecute at start up. The user must make a list of files to be
* loaded, one file per line, to use these four macros:
* file1.ext
* file2.ext
* etc.
* I find it convenient to name each file list with the extension ".ql".
* (Syntax) to autoexecute:
* ------------------------
* Q.EXE [ file_list ] /E[ macfile.mac ] /L[ macfile.mac ]
* For example, if my file list is FILELIST.QL and I have macro @0 as
* the first macro in a file whose macfile is named ring@0.mac, to begin
* editing the first file in FILELIST.QL, after executing the following
* command, press <enter>, or cursor down to another file in the list
* and press <enter>:
* q filelist.ql /Ering@0.mac /LRING12.mac |
* Pressing <enter> repeatedly, cycles between the file list for another
* file to select and a full window with the selected file.
* For this file with @0 as the first macro:
* q ring.ql /ERING12.mac /LRING12.mac |
* <enter>
* <enter> at pause to load RING12.qm
* The file list "ring.ql" is:
* RING12.qm |
* ring.inf |
* ring_tst.qm |
* pick2.bat |
* ring.lst |
* ring.ql |
|
* Pressing escape three time stops cycling. Cycling can be started again
* at any time using macro @9.
* Alternatively, the following may be used: |
* q [ file_list ] /Ering@0.mac /LRING12.mac |
* q [ file_list ] /Ering@1.mac /LRING12.mac |
* q [ file_list ] /Ering@7.mac /LRING12.mac |
* (Directory) Extended DX.EXE:
* ----------------------------
* Directory Extended is the most powerful and versatile file management
* program I am aware of. DX.EXE file list function is used in some of |
* these macros to make a file list of files of a specified file pattern
* sorted by name, date, or extension. It is available in AMAC-PRG.ZIP,
* or on BBS's as DX260 or the earlier version DX210.
* (FILECTRL).COM
* --------------
* I was impressed by the functionality of PC Magazine's FILECTRL.COM in
* the July 1991 issue, v10n13. It overcomes one of the significant
* deficiencies of *all* file and directory programs I am aware of, what
* I call "blind" lists. The text file contents of the file can be
* determined with each cursor down/up without having to press <enter>.
* These macros were written to "partially" emulate this function. It's
* probably easier for you to see how each macro works rather than me
* try to describe more than I have. I have tried to include enough to
* get you started. Any questions or problems, please let me know.
* (AMACxx).ZIP:
* -------------
* 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 AMACxx.ZIP is v38 with new macros and subsequent changes in
* AMAC-K.ZIP. 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
* (Macros):
* =========
*
* ----------------------------------------------------------------------
* @(0)² Load At Command Line First File In a Pre-Made List of Files,
* Faster Version of @1, Does Not Enter All Files In Ring
* (Emulates PC Magazine's FILECTRL.COM After Loading)
* ----------------------------------------------------------------------
* See also ring@0.qm for a separate file with this macro only.
* This macro must be first macro in file to autoexecute at start up.
@0 macrobegin
* horizontalwindow *
* editfile escape *
changefilename "NUL" return *
Markline Copy * Copy selected file name to scrap
horizontalwindow * |
Editfile Paste Return * Load first file in list
prevwindow * NUL window
SELECT: *
Pause * Pause to select file to edit
* UnmarkBlock |
MarkLine Copy * Copy selected file name to scrap
nextwindow * Selected file
EditFile Paste Return * Edit selected file
zoomwindow * Zoom until <enter>
Pause * <enter> to select another file
EDIT: *
nextwindow * Selected window
makectrofscreen *
jump SELECT: * Loop again
*
* 31 bytes Thu 05-09-1991 16:25:46 (TH @0, QLST14.qm)
* 36 bytes Mon 06-24-1991 13:29:54 (TH, @0)
* 33 bytes Wed 06-26-1991 10:26:58 (TH, @0, removed unnecessary unmarkblock)
* ( moved window opening down )
*
* ----------------------------------------------------------------------
* @(1) Load At Command Line All Files From a Pre-Made List of Files,
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM After Loading)
* (Written by Kyle Watkins of SemWare)
* ----------------------------------------------------------------------
* See ring@1.qm for macro.
*
* ----------------------------------------------------------------------
* @(2) Select and Load Files From a PickList of All Files In Ring,
* File Edit Statuses Are Unchanged
* (Does *NOT* Emulate PC Magazine's FILECTRL.COM after Loading)
* (Written by Tom Hogshead and John Goodman)
* ----------------------------------------------------------------------
* The idea for using a unique character to mark position in the NUL file,
* initially proposed by Richard Blackburn of SemWare, is used in @2.
@2 MacroBegin
PrevFile * Position to load NUL file
unmarkblock dropanchor * Mark file we start in |a
EditFile "NUL" Return Quit * Load NUL & quit in case already loaded
gotoblockbeg * Return to file we started in |a
EditFile Return * Edit NUL file
#173 CursorLeft * Place weird char at line beg
OneWindow HorizontalWindow * Open one window with NUL file in
* window 1, starting file in window 2
EditFile Escape *
FILELOOP: * Loop for each file in ring
FindReplace #173 Return * Attempt finding weird char in file
CurrentFileName Return * Retains current file's name
"N" Return
JTrue RINGLIST: * If char found, must be in NUL file
PrevWindow * Back to NUL file in window 1
RepeatFind * Replace weird character with
* CurrentFileName from window 1
AddLine * Add another line for another file
#173 CursorLeft * Type weird char to find again
NextWindow NextFile * Get next file in window 2
Jump FILELOOP: * Go initialize FindReplace, or see if
* we are in NUL file
RINGLIST: * If here, returned back to NUL file
DelLine * Delete entry for NUL file
BegFile * Go to NUL file beg
OneWindow * Close all windows, NUL file loaded
Pause * Pause to select file to edit
UnmarkBlock MarkLine * Unmark prompt, mark selected file
Copy * Copy file name to scrap
EditFile Paste Return * Edit selected file
*
* 57 bytes Thu 05-16-1991 18:56:42 (JG/TH, @2 for all QCONFIG window opts)
* 57 bytes Sat 06-22-1991 16:40:55 (TH @2, changed #250 to #173)
* 56 bytes Tue 06-25-1991 14:45:47 (TH @2, not quit NUL)
* 59 bytes Fri 08-02-1991 10:16:35 (TH @2, changed ring positions |a)
*
* ----------------------------------------------------------------------
* @(3)² Select and Load Files From a PickList of All Files In Ring
* (Emulates PC Magazine's FILECTRL.COM)
* ----------------------------------------------------------------------
* This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
* Michael J. Mefford. A window with a list of all files in the ring
* allows the user to select different files for editing by cursoring
* down to the desired file and pressing <enter>. Pressing <enter>
* again while editing the selected file returns the user to the file
* selection window to select another file. Until this macro is stopped
* by pressing <escape> three times, no other macro may be run.
@3 MacroBegin
PrevFile * Position to load NUL file
unmarkblock dropanchor * Mark file we start in |a
EditFile "NUL" Return Quit * Load NUL & quit in case already loaded
gotoblockbeg * Return to file we started in |a
EditFile Return * Edit NUL file
#173 CursorLeft * Place weird char at line beg
OneWindow * Close all windows
HorizontalWindow * Open one window with NUL file in
* window 1, starting file in window 2
EditFile Escape * In case QCONFIG "Prompt for filename
* on open window (Y/N)?" option=[Y]
FILELOOP: * Loop for each file in ring
FindReplace #173 Return * Attempt finding weird char in file
CurrentFileName Return * Retains current file's name
"N" Return *
JTrue RINGLIST: * If char found, must be in NUL file
PrevWindow * Back to NUL file in window 1
RepeatFind * Replace weird character with
* CurrentFileName from window 1
AddLine * Add another line for another file
#173 CursorLeft * Type weird char to find again
NextWindow NextFile * Get next file in window 2
Jump FILELOOP: * Go initialize FindReplace, or see if
* we are in NUL file
RINGLIST: * If here, go to NUL file
NEXTFILE * |
prevwindow * NUL window
DelLine * Delete entry for NUL file
BegFile * Go to NUL file beg
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock MarkLine * Unmark, mark selected file
Copy * Copy selected file name to scrap
nextwindow *
EditFile Paste Return * Edit selected file
zoomwindow *
Pause *
EDIT: *
nextwindow * File window
makectrofscreen *
jump SELECT: *
*
* 67 bytes Fri 06-21-1991 14:03:40 (TH @3)
* 67 bytes Sat 06-22-1991 13:40:21 (TH @3, changed #250 to #173)
* 68 bytes Sun 06-23-1991 15:33:08 (TH @3 added NextFile)
* 65 bytes Mon 06-24-1991 21:14:14 (TH @3, shortened)
* 68 bytes Fri 08-02-1991 10:24:36 (TH @3, changed ring positions |a)
*
* ----------------------------------------------------------------------
* @(4)² Select and Load Files From a DOS "DIR" Picklist, User Inputs
* File Pattern To Make PickList
* (Emulates PC Magazine's FILECTRL.COM)
* ----------------------------------------------------------------------
* This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
* Michael J. Mefford. DOS Dir is used to make a FileList. A window
* containing a list of all files in the directory matching a user
* determined file pattern allows the user to select a file to load
* and edit by cursoring down to the desired file and pressing
* <enter>. Pressing <enter> again while editing the selected file
* returns the user to the file selection window to select another
* file. Until this macro is stopped by pressing <escape> three times,
* no other macro may be run. DIR FileList is sorted alphabetically.
@4 Macrobegin
AltWordSet * For all file names
PrevFile *
EditFile "c:!" Return Quit * Quit sorted file list if loaded
OneWindow * Close all windows
Dos "DIR " Pause EndLine ">c:!" * Make DIR list to temp file
return return *
EditFile Return * Load list
* EditFile "c:!" return * Load list
DelLine 4 * Delete header info
* May have to change DOSVER >3.3
EndFile DelLine * Delete totals line
JFalse ABORT: * Failed? NO FILES!
BegFile * Back to bof, please.
LOOPDIR: *------- Remove <DIR> Lines Loop -------*
Find "<" Return Return * Find <dir>
Jfalse ENDDIR: * If false, no more <dir>'s,
Delline *ELSE Delete <dir> line
CursorLeft *
Jump LOOPDIR: * And do 'till done
ENDDIR:
Endfile Markcolumn * |
BegFile * BOF for sorting |
Sort * Sort by name |
MarkLine * Make a line block |
GotoColumn "9" Return * Go to where "." goes
GotoBlockend *
MarkColumn * Start column block
PrevPosition * Move to top of block
Fillblock "." Return * Insert dot's
UnmarkBlock *
SPACEOUT: *
GotoColumn "13" Return *
MarkColumn *
EndFile *
MarkColumn *
Cut *
BegFile *
FindReplace " " Return * replace all spaces with
DelLine Return * NOTHING!
"NG" Return * No prompting, just do it.
GotoColumn "13" Return *
Paste *
UnmarkBlock *
ABORT: *
BegFile *
HorizontalWindow * Open one window |
EditFile Escape * In case QCONFIG "Prompt for filename |
* on open window (Y/N)?" option=[Y] |
PrevWindow * Window 1 |
EditFile Return * Load file list window 1
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock *
BegLine *
MarkWord *
Copy * Copy selected file name to scrap
NextWindow *
EditFile Paste Return * Edit selected file
ZoomWindow *
Pause * Pause to edit file, <enter> to select
* another file
EDIT: *
NextWindow * Select window 1
MakeCtrofScreen *
jump SELECT: *
*
* 142 bytes Sun 06-23-1991 12:49:31 (TH @3)
* 142 bytes Sun 06-23-1991 15:34:15 (TH @3, added PrevFile, rmvd. Zoom)
* 139 bytes Mon 06-24-1991 16:52:14 (TH @3, added sort)
* 133 bytes Mon 06-24-1991 21:13:40 (TH @3, removed extra c:!)
*
* ----------------------------------------------------------------------
* @(5)² Select and Load Files From a PickList Made Using Directory
* Extended, DX.EXE, User Selects Desired File Extension and
* Sort Options From a Pre-Made File "FILE.SRT" To Make PickList
* (Emulates PC Magazine's FILECTRL.COM)
* ----------------------------------------------------------------------
* This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
* Michael J. Mefford. DX.EXE Directory Extended is used to make a
* File List sorted by Name, Date or Extension. DX.EXE must be located
* in the path. A window containing a list of all files in the
* directory matching a user determined file pattern allows the user
* to select a file to load and edit by cursoring down to the desired
* file and pressing <enter>. Pressing <enter> again while editing the
* selected file returns the user to the file selection window to
* select another file. Until this macro is stopped by pressing
* <escape> three times, no other macro may be run.
* DX.EXE is contained in AMAC-PRG.ZIP, or see AMACxx.ZIP/FILExx.ZIP
* for other download sources.
* Before running this macro, *make* the following two files if they
* are not available:
* ┌───-──────────────── FILE.SRT ───────────────────────────────────────
* │ qm d- date - Cursor down to select extension (col 1) and
* │ bak d- date sorting option (col 2), then [enter]
* │ bat d- date d- descending date
* │ * d- date n- descending name
* │ qm n name a+ ascending extension
* │ bak n name - Must have Directory Extended DX.EXE in path
* │ bat n name - Add/Delete extensions and sorting options
* │ * n name - Extension "*" selects all files in directory
* │ * ed- ext/date
* │ * en ext/name
* └─────────────────────────────────────────────────────────────────────
* ┌─────────────────── PICK2.BAT ───────────────────
* │ @echo PICK2.BAT June 23, 1991
* │ @DX.EXE %1 //SING/HE:0/ST:1/AT:d-/SO:%2/Out:>c:!
* └─────────────────────────────────────────────────
@5 Macrobegin
AltWordSet * For all file names
EditFile "FILE.SRT" Return * Load sort list
Pause * Select sort type
MarkLine Copy * Copy line to scrap
Quit * Quit FILE.SRT
DOS "PICK2" " ." * Make/sort file list |
Paste Return Return *
PrevFile * Position to load DIR list
EditFile "c:!" Return Quit * Quit sorted file list if loaded
OneWindow * Close all windows
HorizontalWindow * Open one window
EditFile Escape *
PrevWindow * Window 1
EditFile Return * Load sorted file list window 1
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock *
BegLine WordRight MarkWord *
Copy * Copy selected file name to scrap
NextWindow *
EditFile Paste Return * Edit selected file
ZoomWindow *
Pause *
EDIT: *
NextWindow * Select window 1
MakeCtrofScreen *
jump SELECT: *
*
* 91 bytes Sun 06-23-1991 16:05:13 (TH @5, removed Zoom, corrected FILE.SRT)
* 83 bytes Mon 06-24-1991 21:14:31 (TH @5, moved window open down)
* 79 bytes Wed 06-26-1991 18:25:31 (TH @5, changed batch file to PICK2.BAT)
*
* ----------------------------------------------------------------------
* @(6)² Select and Load Files From a PickList Made Using Directory
* Extended, DX.EXE, User Inputs File Pattern and Sorting Options
* To Make PickList
* (Emulates PC Magazine's FILECTRL.COM)
* ----------------------------------------------------------------------
*
* This macro emulates PC Magazine's July 1991 FILECTRL.COM written by
* Michael J. Mefford. User specifies file pattern and sorting option
* at the DOS prompt. DX.EXE Directory Extended is used to make a file
* PickList sorted by Name, Date or Extension. File DX.EXE must be
* located in the path. A window containing a PickList of all files in
* the directory matching a user specified file pattern allows the
* user to select a file to load and edit by cursoring down to the
* desired file and pressing <enter>. Pressing <enter> again while
* editing the selected file returns the user to the file selection
* window to select another file. Until this macro is stopped by
* pressing <escape> three times, no other macro may be run.
* DX.EXE is contained in AMAC-PRG.ZIP, or see AMACxx.ZIP/FILExx.ZIP
* for other download sources.
* SYNTAX: [ FileName(s) ] [ File Sort Options (esda) ] <enter>
* Sort option without a value sorts files by name and then extension
* in ascending order. Sorting criteria are: "N" for name, "E" for
* extension, "S" for size, "D" for date/time, "A" for attribute.
* Specifying a sorting option with with a "+" suffix indicates
* ascending order; specifying a "-" suffix indicates descending
* order.
* Sorting Examples:
* -----------------
* [filename(s)] ne => sort by name and extension
* [filename(s)] e-n- => sort files descending by extension
* first and then by descending name
* [filename(s)] snd- => sort files by ascending size, ascending
* name, and then descending date
* "C*.* s-" sorts files in the current directory beginning with the
* letter "C" by size, largest first. A space must be included between
* name/sort option!
* Before running this macro, *make* the following batch file if it is
* not available:
* ┌─────────────────── PICK2.BAT ───────────────────
* │ @echo PICK2.BAT June 23, 1991
* │ @DX.EXE %1 //SING/HE:0/ST:1/AT:d-/SO:%2/Out:>c:!
* └─────────────────────────────────────────────────
@6 Macrobegin
AltWordSet * For all file names
EditFile "c:!" Return Quit * Quit PickList if loaded
DOS "PICK2 " * Make PickList
Pause return return *
OneWindow * Close all windows
PrevFile * Position to load DIR list
HorizontalWindow * Open one window
EditFile Escape *
PrevWindow * Window 1
EditFile "c:!" return * Load PickList window 1
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock *
BegLine WordRight MarkWord *
Copy * Copy selected file name to scrap
NextWindow *
EditFile Paste Return * Edit selected file
ZoomWindow *
Pause *
EDIT: *
NextWindow * Return to PickList for another selection
MakeCtrofScreen *
jump SELECT: *
*
* 61 bytes Mon 06-24-1991 13:47:54 (@6, TH)
*
* ----------------------------------------------------------------------
* @(7)² Load At Command Line All Files From a Pre-Made List of Files,
* Modification of @1
* (Emulates PC Magazine's FILECTRL.COM After Loading)
* ----------------------------------------------------------------------
* See also ring@7.qm for macro.
@7 MacroBegin
changefilename "NUL" return * |
*-- This section written by Kyles Watkins of SemWare -----
EndFile BegLine * start at last line
REPEAT:
* UnmarkBlock * (line removed by TH, not needed) |
MarkLine Copy * grab this name
EditFile * get ready to load
CurrentFilename " " * to force return *here*
Paste Return * paste file name & do it!
CursorUp * more lines above?
JTrue REPEAT: * if yes, repeat.
*---------------------------------------------------------
* OneWindow * Close all windows (not necessary) |
HorizontalWindow * Open one window
EditFile Paste Return
PrevWindow * Window 1
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock *
BegLine MarkLine *
Copy * Copy selected file name to scrap
NextWindow *
EditFile Paste Return * Edit selected file
ZoomWindow *
Pause *
EDIT: *
NextWindow * Return to PickList for another selection
MakeCtrofScreen *
jump SELECT: *
*
* 41 bytes Mon 06-24-1991 23:23:00 (TH @7)
* 47 bytes Wed 06-26-1991 10:12:41 (TH @7, added changefilename "NUL")
* ( removed unnecessary unmarkblock)
* ( removed unnecessary onewindow )
*
* ----------------------------------------------------------------------
* @(8)² Load While Editing All Files In Pre-Made List of Files,
* Modification of @1
* (Emulate PC Magazine's FILECTRL.COM),
* ----------------------------------------------------------------------
@8 MacroBegin
onewindow *
prevfile *
horizontalwindow *
editfile escape *
prevwindow *
EditFile "NUL" Return * Edit NUL to load all files in ring
EndFile BegLine * start at last line
REPEAT: *
* UnmarkBlock * |
MarkLine Copy * grab this name
EditFile * get ready to load
CurrentFilename " " * to force return *here*
Paste Return * paste file name & do it!
CursorUp * more lines above?
JTrue REPEAT: * if yes, repeat.
SELECT: *
Pause * Pause to select file to edit
UnmarkBlock MarkLine * Unmark, mark selected file
Copy * Copy selected file name to scrap
nextwindow * Selected file
EditFile Paste Return * Edit selected file
zoomwindow * Zoom until <enter>
Pause * <enter> to select another file
EDIT: *
nextwindow * Selected window
makectrofscreen *
jump SELECT: * Loop again
*
* 48 bytes Tue 06-25-1991 14:36:14 (TH @8)
* 47 bytes Wed 06-26-1991 13:51:29 (TH @8, removed unnecessary unmarkblock)
*
* ----------------------------------------------------------------------
* @(9)² Begin or Continue Emulation of PC Magazine's FILECTRL.COM
* After Macros @1 to @7 Have Been Stopped
* ----------------------------------------------------------------------
@9 macrobegin
onewindow *
horizontalwindow *
editfile escape *
prevfile prevwindow *
editfile "NUL" return *
SELECT: *
Pause * Pause to select file to edit
MarkLine Copy * Copy selected file name to scrap
nextwindow *
EditFile Paste Return * Edit selected file
zoomwindow *
Pause *
EDIT: *
nextwindow * File window
makectrofscreen *
jump SELECT: *
*
* 31 bytes Thu 05-09-1991 16:25:46 (TH @0, QLST14.qm)
* 32 bytes Mon 06-24-1991 13:30:07 (TH @9)
*
* ----------------------------------------------------------------------
* @(f1) Load Previously Saved List of Files Made With @f2
* ----------------------------------------------------------------------
* This macro loads the list of files previously saved with @2. This is
* a modification to a macro written by Kyle Watkins of SemWare to load
* a list of files and macro @2 above.
* If this macro is the first macro in a file named 'ring@f1.qm', the
* following batch file, 'ring.bat' will load from the command line the
* list of files previously saved with @f2, with the file you were
* editing when @f2 was invoked, loaded:
* q.exe qstat /Ering@f1.mac
* See ring@f1.qm for macro.
*
* ----------------------------------------------------------------------
* @(f2) Save List of Files In Ring
* ----------------------------------------------------------------------
* This macro saves a list of files loaded in the ring. If files have
* been changed, it will prompt you with "Save Changes (Y/N)?". This
* macro is based on a technique originally written by Richard Blackburn
* of SemWare and modified by me to use windows.
@f2 MacroBegin
PrevFile * Position to load NUL file
unmarkblock dropanchor * Mark file we start in
EditFile "NUL" Return Quit * Load NUL & quit in case already loaded
gotoblockbeg * Return to file we started in
EditFile Return * Edit NUL file
#173 CursorLeft * Place weird char at line beg
OneWindow HorizontalWindow * Open one window with NUL file in
* window 1, starting file in window 2
EditFile Escape *
FILELOOP: * Loop for each file in ring
FindReplace #173 Return * Attempt finding weird char in file
CurrentFileName Return * Retains current file's name
"N" Return
JTrue RINGLIST: * If char found, must be in NUL file
PrevWindow * Back to NUL file in window 1
RepeatFind * Replace weird character with
* CurrentFileName from window 1
AddLine * Add another line for another file
#173 CursorLeft * Type weird char to find again
NextWindow NextFile * Get next file in window 2
Jump FILELOOP: * Go initialize FindReplace, or see if
* we are in NUL file
RINGLIST: * If here, returned back to NUL file
DelLine * Delete entry for NUL file
BegFile * Go to NUL file beg
OneWindow * Close all windows, NUL file loaded
unmarkblock * Unmark starting mark
writeblock "qstat" return * Save list of files in ring
"o" * Overwrite option in case list exists
quit * Quit NUL
gexit * Exit with prompt to save changed files
*
* 69 bytes Fri 08-02-1991 11:50:48 (TH @f2)
*
* ----------------------------------------------------------------------
* @(F6) Makes a DIR List of Filenames in Conventional "8.3" Format,
* NO SPACES, with Date and Time, like this:
* FILE25.QM 64795 6-23-91 4:12a
* ----------------------------------------------------------------------
* DOS DIR command produces a list of files with filenames containing
* space and no dot between the file name prefix and extension. This
* macro modifies my earlier macro in AMACxx.ZIP(v38)/FILExx.ZIP(v24),
* based on a macro written by Tim Farley, to produce a list of files in
* conventional "8.3" format. This macro is faster and "smoother" than
* the previous versions. Removing the three lines near then end of the
* macro produces a file list without the date and time. Wild cards are |
* OK.
* DIR <enter> gives this...
*---------------------------
* Volume in drive E is Seagate 1
* Directory of E:\UP
*
* . <DIR>
* .. <DIR>
* TEMP <DIR> 6-23-91 9:47a
* .
* FILE25 QM 64795 6-23-91 4:12a
* .
* 347 File(s) 4513792 bytes free
* @F6 <enter> gives this...
*---------------------------
* .
* FILE25.QM 64795 6-23-91 4:12a
* .
@F6 macrobegin
AltWordSet * For all file names
Dos "DIR " * Do DOS DIR listing
Pause * Pause for file pattern
EndLine ">c:!" return return *
EditFile "c:!" Return Quit * Quit temp file if loaded
editfile return * Load DIR list
DelLine 4 * Delete header info
* May have to change for DOSVER >3.3
EndFile DelLine * Delete totals line
JFalse ABORT: * Failed? NO FILES!
BegFile * Back to bof, please.
LOOPDIR: *------- Remove <DIR> Lines Loop -------*
Find "<" Return DelLine Return * Find <dir>
Jfalse ENDDIR: * If false, no more <dir>'s,
Delline *ELSE Delete <dir> line
CursorLeft *
Jump LOOPDIR: * And do 'till done
ENDDIR:
Endfile Markcolumn * |
BegFile * BOF for sorting |
Sort * Sort by name |
MarkLine * Make a line block |
Gotocolumn "9" return * Go to where "." goes
gotoblockend *
markcolumn * Start column block
prevposition * Move to top of block
Fillblock "." return * Insert dot's
unmarkblock *
SPACEOUT: *
gotocolumn "13" return *
markcolumn *
endfile *
markcolumn *
cut * Cut Date and Time to scrap
BegFile *
FindReplace " " Return * Replace all spaces with
DelLine Return * NOTHING!
"NG" Return * No prompting, just do it.
* --------- Remove next three lines to remove Date and Time ---------*
gotocolumn "13" return *
paste * Paste Date and Time back
unmarkblock *
* -------------------------------------------------------------------*
ABORT: *
defaultwordset *
begfile *
*
* 110 bytes Sun 06-23-1991 10:20:14 (TH @f6)
* 111 bytes Tue 06-25-1991 14:57:15 (TH @f6, | sort names)
*
* ----------------------------------------------------------------------
* @(h) Jump From Index Line To (Locate) Macro or Item In Document Below
* ----------------------------------------------------------------------
* Alt_h can be used to quickly jump from Index Line to the desired
* item or macro in the document below:
* 1. Press Alt and h at the same time. Line 1 is marked to
* highlight. Cursor down to desired line in Index.
* 2. Press Enter. The macro then locates and jumps to the item
* selected on the cursor line in the document below.
* See BOOKxx.Qm and JMPPOSxx.QM in AMACxx.ZIP for more discussion about
* using bookmarks and positions markers ( ) to jump to positions in
* files.
@h macrobegin
unmarkblock * Unmark any marked blocks
defaultwordset * In case altwordset on
begfile *
endpara * Move to end of Index
markline * Mark it
begfile * Move to bof
find "(" return "L" return * Locate first Index selection line
jfalse NOMARK: *
makectrofscreen * Show top of file
begfile * Move back to bof
unmarkblock markline markline * And highlight line 1
prevposition * Move back to first selection line
begline * Cursor in col 1
pause * Pause for Index selection
wordright markword * Mark first word on line
copy * Copy word to scrap
endpara * Go to end of Index
find "(" paste ")" *
return "I" return * Find first marked word in doc
jfalse NOMARK: *
begline * If mark found go to begline
maketopofscreen scrollup * Cursor on line 2 |a
jump END: *
NOMARK: *
begfile * If no mark found go to begfile
END:
*
* 52 bytes Wed 07-31-1991 14:43:31 (TH @h, @4 in BOOKxx.QM)
*
* ----------------------------------------------------------------------
* @(r) Reset to DefaultWordSet After Macros Complete
* ----------------------------------------------------------------------
@r defaultwordset
*
* ----------------------------------------------------------------------
* (NEWKEY) macro to stop macro at pause, close all windows, and set
* defaultwordset:
* ----------------------------------------------------------------------
* <esc><esc><esc><ctrlo>o< key_assigned_to_defaultwordset >
* The above NEWKEY macro simulates a QEdit macro:
* escape escape escape
* onewindow
* defaultwordset
* (Version) History
* =====================================================================
* June 25, 1991 1.0 - Initial
* July 2, 1991 1.1 - Corrected documentation
* - Added changefilename "NUL" to @7 to be
* consistent with @0.
* - Removed unnecessary unmarkblock in @0/7/8.
* - Removed unnecessary onewindow in @7.
* - Moved window opening down in @0.
* - Changed @5 to use PICK2.BAT only. FILE-DX2.BAT
* is now not needed for any RINGxx.QM macro.
* July 5, 1991 1.1a - Minor documentation changes.
* July 10, 1991 - Added latest version of @h.
* August 2, 1991 1.2 - Changed ring positions in @2 and @3.
* - Added @f1 and @f2 to save and restore ring files.
* - Changed @f key to @r.
* August 3, 1991 - Macros @1, @7 and @f1 are now only in subfiles
* for use to autoexecute at start up.
* - Added latest version of @h.
* (Included in AMACxx v 4.0)
* 1.2a - Corrected @7 subfile name in RINGxx.index. 8/6/91
* - Added second copy of @7 to RFRMxx.QM. 8/6/91
*
*
*
*
*
*
*
*