home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK5
/
DOS_34
/
AMAC44.ZIP
/
FIL003.QM
< prev
next >
Wrap
Text File
|
1992-05-27
|
9KB
|
194 lines
* fil003.qm
* Miscellaneous File Macros
* Written By Tom Hogshead
* [ See FILExx.QM For Use ]
* 5/26/92
*
* Key Subfile Description
* ===== ============== ====================================================
* @f1 Spell Check WITH backup, Qconfig Backups On or Off ( )
* @f2 Spell Check WITHOUT backup, Qconfig Backups On or Off
* @f3 QUIT all files in "Ring"
* @f4 EXECUTE Dos command from List
* @f5 EXECUTE Dos command from List With CurrentFileName
* @f6 EXECUTE DOS command without full path name
* @f7 Put Colon In Front of Rem Line
* For Faster Batch File Operation
* @f6 {e:\up\RING*} Makes a DIR List in Conventional "8.3" Format,
* NO SPACES, With Date And Time, Like This:
* FILE25.QM 64795 6-23-91 4:12a
* (See RINGxx.QM for this macro)
*
* {e:\up\FILE*} Return To FILExx.QM
*
*--eoi
* M A C R O S
*------------------------------------------------------------
* @(f1) Spell Check Current File WITH Backup With ShareSpell,
* QCONFIG.DAT backups ON or OFF, SS makes a backup file.
*------------------------------------------------------------
@f1 Macrobegin *
SaveFile * Save file
Dos "SS " CurrentFileName Return Return * Spell Check
EditFile CurrentFileName Return * Set EditFile prompt
NewFile Return * Load Spell checked file
*
* 20 bytes Wed 02-13-1991 12:32:29
* 20 bytes Tue 05-26-1992 09:44:28 (TH @f1, changed key from #f3)
*
*-----------------------------------------------------------------
* @(f2) Spell check WITHOUT backup, QCONFIG.DAT backups ON or OFF
*-----------------------------------------------------------------
* This macro does not save a backup file no matter how QCONFIG.DAT is
* configured for backups. If a beep is heard, the file being spell
* checked does not have an extension (no dot was found).
@f2 Macrobegin
Unmarkblock Insertline Begline * Insert temp line with
Dropanchor CurrentFileName * CurrentFileName marked
Find "." Return "LB" Return * Find dot backwards in name
DelToEol ".bak" * Add .bak
Cut Savefile * Cut name.bak to scrap/save it
DOS "SS " CurrentFileName Return Return * ShareSpell spell check
DOS "DEL " Paste Return Return * Delete name.bak
EditFile CurrentFileName Return * Set EditFile prompt
NewFile Return * Load spell checked file
*
* 56 bytes Sun 02-17-1991 14:02:28
* 56 bytes Tue 05-26-1992 09:45:02 (TH @f2, changed key from #f4)
*
* ----------------------------------------------------------------------
* @(f3) QUITs all Files in Ring
* ----------------------------------------------------------------------
@f3 Macrobegin LOOP: quit jump LOOP
*
* 8 bytes Sat 09-29-1990 00:03:46
* 8 bytes Tue 05-26-1992 09:43:21 (TH @f3, changed key from @q)
*
* ----------------------------------------------------------------------
* @(f4) Execute Dos Commands From List
* ----------------------------------------------------------------------
* To run, just press @f4 and move cursor line to the desired command
* to execute. Then press <enter> to execute command and return to file
* you editing. Modify DOS.LIST as you need.
*
* Run Syntax: [command] <enter>
@f4 Macrobegin
unmarkblock *
EditFile "DOS.LST" return * Load command list
* pause * Select command
copy * Get command to scrap
quit * Quit command list
DOS paste return * Execute Dos command
*
* 27 bytes Mon 02-11-1991 11:11:56
*
* ----------------------------------------------------------------------
* @(f5) Execute Dos Commands From List With CurrentFileName
* ----------------------------------------------------------------------
* To run, just press @f5 and move cursor line to the desired command
* to execute. Then press <enter> to execute command. Press <enter> again
* to return to file you were editing. Dos executes the command as if it
* were run at the command line followed by the CurrentFileName, then
* <enter>. Modify the DOS.LIST as you need.
* I recall getting this macro from the SemWare BBS but do not recall
* the author. If anyone knows, please let me know so I can give proper
* credit. It's quite a useful and simple macro.
* Syntax: [command] CurrentFileName <enter>
@f5 Macrobegin
unmarkblock *
EditFile "DOS.LST" return * Load command list
* pause * Select command
copy * Get command to scrap
quit * Quit command list
DOS paste " " CurrentFileName * Execute command w/
* CurrentFileName
return *
*
* 30 bytes Sat 09-15-1990 09:24:37
*
* ----------------------------------------------------------------------
* @(f6) Execute DOS Command For Programs Not Requring Full Path Name
* ----------------------------------------------------------------------
@f6 Macrobegin
Unmarkblock Insertline * Insert temp line
CurrentFileName * with CurrentFileName
MarkCharacter * Begin mark
Find "\" Return "B" Return * Find \ backwards
CursorRight Cut * Cut filename to scrap
Delline * Delete temp line
Dos Pause " " Paste Return * Pause for DOS command
*
* 24 bytes Tue 04-23-1991 11:58:35
* 24 bytes Tue 05-26-1992 09:49:40 (TH @f6, changed key from @f9)
*
* ---------------------------------------------------------------------
* @(f7) Put Colon In Front of Rem Line For Faster Batch File Operation
* ---------------------------------------------------------------------
* "Rem" lines in batch files make batch files run slower. Lines which
* are labels (colon as first character) do not. This macro simply puts
* a colon in column 1 for each line containing "rem ". Each rem line
* for my system takes about 0.2 seconds with disk cache, and 0.5
* seconds per line with no disk cache. I found one batch file with 30
* plus rem lines - 6 to 15 seconds less running time by labelling rem
* lines!
* NOTE: At least a space and one character of text must follow "rem"
* to be labelled, eg the following would not be labeled:
* rem
* echo remember
* The following would be labeled:
* rem this is a test
* echo harem holiday!
*
@f7 MacroBegin
Begfile InsertLine * Insert blank line in case
* rem in col/line 1/1
Editfile "c:\!" Return * Load temp file
KillFile Quit * To kill/quit it
EditFile Return * Load empty temp file and
SaveFile * save it for append later
Quit * Quit it for now
START:
Unmarkblock
Find "rem " Return "I " Return * Find "rem "
Jfalse END * No rem lines, end macro
BegLine *ELSE line has rem, go to bol
Dropanchor Wordright Dropanchor * Mark space up to "rem"
Shiftright * Shift line rt one space
Begline * Bak to bol
Find ":" Return "L" Return * See if line has colon at beg
Jtrue NEXT
Cursorright ":" *ELSE line has no colon, add it!
NEXT: *
Shiftleft * Shift line back lft one space
Markline
WriteBlock Return "A" * Append line to c:\!
Endline Cursordown * Move off rem and chk for last
Jfalse END
Cursorup *ELSE Line is not last, cur up
Jump START * Loop again
END:
Begfile * Begin of batch file
DelLine * Delete top blank line
Editfile Return * Load c:\!, look at rem lines
DelLine KillFile * with added colon, kill file
UnMarkBlock * Un mark batch file
*
* 82 bytes Mon 03-25-1991 16:49:26
* 82 bytes Tue 05-26-1992 09:45:53 (TH @f7, changed key from ^f7)