Jan 072018
 
Collection of macros for DOS 5.0.
File MACROS10.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Collection of macros for DOS 5.0.
File Name File Size Zip Size Zip Type
MACROS.BAT 673 304 deflated
MACROS.DOC 11758 4117 deflated

Download File MACROS10.ZIP Here

Contents of the MACROS.DOC file


MACROS.DOC

"The Macro Starter Kit" is shareware (c) copyright, 1991, by Chet Langin,
Langin Software, 532 W. 3rd St., Centralia, IL 62801 USA. CIS: 73770,615.

This is version 1.00.

Who may distribute this:

Any ASP vendor.
Any BBS. (The preferred filename is MACROS.ZIP.)
Anyone for non-commercial reasons.

Others must obtain permission from Langin Software. Permission will be
granted to those who support registration fees for shareware authors.
The registration fee is US $10.00.

"The Macro Starter Kit" is a collection of 19 macros for MS-DOS 5, which is
required. Each macro is described in this manual. The macros are:

format mbeep mclear mdate
mdir mfilelist mfind mformfeed
mhelp mlinefeed mlinefeed8 mmd
mmem mparent mprint mroot
mtime mtype mwhereis

The Macro Starter Kit is for people who already have some experience in
using DOS. It is not for beginners.

Installation, and how to use this kit:

(1) Print this file, so you can read it while you're working at your
computer.

(2) The following command should be in your AUTOEXEC.BAT file:

doskey /bufsize=1024>nul

This needs to be in the AUTOEXEC.BAT file because the buffer size should
only be set once. Don't forget to reboot.

(3) The macros are located in the MACROS.BAT file. Copy this file to
whatever directory you use to keep your batch files in. Then, run it.
The batch file will install the macros for you.

(4) Refer to the following explanations of the macros as you try them.
Some are easy, some are not. To try a macro, simply enter the macro's
name at the DOS prompt. Look at the "Usage" for each macro, listed below,
to see if parameters or switches are needed. Some macros are extremely fast,
and others take several seconds (be patient).

Note: This kit is not intended to repeat the explanations of macros in the
MS-DOS 5 manual.

(5) Use the editor of your choice to change the MACROS.BAT file. You have
four options:

A) The macros you like, leave them.
B) The macros you don't like, delete them.
C) The macros you almost like, change them.
D) Add your own macros to the file.

Beware: The MACROS.BAT file contains "control characters," such as beep,
formfeed, and linefeed characters.

(6) Run the MACROS.BAT file, again, (and, again,) until you get it like you
want it. Each time you run it, the currently installed macros will be
updated, if appropriate, to match the file. If you add many macros, you
may need to increase the buffer size (see Step 2, above). If you are
having trouble with a particular macro, put it in its own batch file to
install and test it. When it works, add it to the MACROS.BAT file.

(7) When you have the MACROS.BAT file like you want it, add the following
line to your AUTOEXEC.BAT file:

call macros

This will run your batch file for you. Don't forget to put this line in
your AUTOEXEC.BAT file below the line specified in Step 2, above.

(8) If you make it this far, send US $10.00 to Langin Software at the
address at the top of this file.


*************************************
** Individual Macro Explanations **
*************************************

Notes:

The ^ character indicates a control character. For example, ^L means
"control L", which is the character to send a formfeed to a printer.

Each macro, except format, begins with an "m", for "macro". This is so
the macro names should not conflict with utility and batch file names.



"format"
--------

doskey format=rem format is disabled

Usage: format

Disables the format command for unaware users. When FORMAT is entered,
the macro enters "rem format is disabled" instead of doing a format.
To actually use the format command, begin it with a space, like this:
" format". Then, DOS ignores the format macro and executes the actual
format command.

"mbeep"
-------

doskey mbeep=echo ^G

Usage: mbeep

^G is the "beep" character. This macro echos ^G to the display, thus
causing a beep.

"mclear"
--------

doskey mclear=mode co80

Usage: mbeep

"Mode co80" is a DOS command which resets the display to a color
80-column mode. It clears the display while doing so. Use this
when unpolite programs leave your display with 40 columns or
weird colors, or anytime when you want to clear clutter from your
display.

"mdate"
-------

doskey mdate=echo ^C$bdate

Usage: mdate

Displays the date via the DOS DATE command. Echoing ^C to the
DATE command interrupts the command when a new date is requested,
saving the user the effort of pressing to do this. The
"$b" stands for the pipe character (|). If this command were
entered from the DOS prompt, it would look like this:
"echo ^C|date".

"mdir"
------

doskey mdir=dir $1/ad/on/p$tpause$tdir $1/a-d/on/p

Usage: mdir [drive:][path][filename]

Displays a customized directory. It is in three parts: (1) a
directory command which displays directories in alphabetical order;
(2) a pause; and, (3) a second directory command which displays files
in alphabetical order. $1 is a variable which specifies the drive,
path, and filename, if any. $t separates the commands.

"mfilelist"
-----------

doskey mfilelist=chkdsk \/v$bmore

Usage: mfilelist

Displays a list of all of the files on a disk, including their
directories.

"mfind"
-------

doskey mfind=for %%x in ($2) do FIND $1 %%x $3$4$5$6$gtemp$ttype temp$bmore

Usage: mfind "string" [drive:][path]filename [/v][/c][/n][/i]

The DOS find command does not use the * and ? wildcard characters.
But, this macro can change that. $1 is a variable which contains
the string to search. $2 is a variable which contains the drive
and path, if any, and the filename (including wildcards) of the
files to be searched. $3, $4, $5, and $6 are variables which contain
the find switches, if any. The macro is in two parts: (1) searches
each file for the string, saving the output to a TEMP (for "temporary")
file; and, (2) the TEMP file is typed with the more filter. $g is the
> redirection symbol. $t separates the commands. $b is the pipe
character, |. Note: The DOS manual shows the switches coming before
the string, but for the macro to work, the switches must come after
the string and the filename.

"mformfeed"
-----------

doskey mformfeed=echo ^L$gprn

Usage: mformfeed

Sends a formfeed character, ^L, to the printer. $g means the >
character. From the DOS prompt, this command looks like this:
"echo ^L>prn". Some people shorten "formfeed" to "ff". However,
some people also shorten "file finder" to "ff". So, "formfeed" is
spelled out to avoid a conflict.

"mhelp"
-------

doskey mhelp=doskey/macros

Usage: mhelp

Displays a list of the currently active macros.

"mlinefeed"
-----------

doskey mlinefeed=echo ^J$gprn

Sends a linefeed character, ^J, to the printer. $g means the >
character. From the DOS prompt, this command looks like this:
"echo ^J > prn". Some people shorten "linefeed" to "lf". Some
printers will not print a line of text because the "enter" character
has not been sent to the printer. The mlinefeed macro will have
the line printed in these situations.

"mlinefeed8"
------------

doskey mlinefeed8=for %%x in (x x x x x x x x) do echo ^J$gprn

Usage: mlinefeed8

Sends eight line feeds to the printer via the for/in/do command.
%%x is a variable used just to count, and nothing else. The eight
x's in parentheses causes %%x to count to eight (an additional x
would cause it to count to nine). The linefeed character, ^J, is
sent to the printer each time. $g stands for the > redirection
symbol. Some printers stop printing with some of the text too low
to read. mlinefeed8 moves the text up high enough to read it.

"mmd"
-----

doskey mmd=md $1$tcd $1

Usage: mmd [drive:]path

Makes a new directory and moves to it. $1 is the drive, if any,
and path of the new directory. $t separates the commands.

"mmem"
------

doskey mmem=mem/d$bmore$tpause$tmem/c$bmore

Usage: mmem

Sends a better mem display. First, the old debug display is shown
and then the new classify display is shown. $b stands for the pipe
character, |. $t separates the commands.

"mparent"
---------

doskey mparent=cd..

Usage: mparent

For those who cannot remember if it is one or two dots to move to
the parent directory. (Child is one syllable and is one dot; parent
is two syllables and is two dots.) Nonetheless, mparent goes to the
parent directory.

"mprint"
--------

doskey mprint=type $1$gprn$techo ^L$gprn

Usage: mprint [drive:][path]filename

Prints a file the way we really like to do it: With the type
command. $1 is a variable which specifies the drive and path,
if any, and the filename. $g is the > redirection symbol. $t
separates the commands. "echo ^L$gprn" sends a formfeed character
to the printer.

"mroot"
-------

doskey mroot=dir\/ad/on/p

Usage: mroot

Displays the directories in the root directory.

"mtime"
-------

doskey mtime=echo ^C$btime

Usage: mtime

Displays the time. The ^C character is sent to avoid having
to press enter. %b is the pipe character, |.

"mtype"
-------


doskey mtype=type $1$bmore

Usage: mtype [drive:][path]filename

How many times have you typed a file to see if go flying off the
top of the screen? Then, you have to retype it with the more
filter. mtype includes more every time. $1 is a variable which
contains the drive and path, if any, and the filename. $b is the
pipe character, |.

"mwhereis"
----------

doskey mwhereis=dir\$1/s$bmore

Usage: mwhereis filename

Finds filenames on a disk. This is done with the directory command
which now has the /s switch to include subdirectories. $1 is the
filename to be searched for. The more filter is used in case there
are many such filenames in different directories. The $b is the
pipe character, |.


*********************
** ASP Ombudsman **
*********************

This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the member
directly, ASP may be able to help. The ASP Ombudsman can help you resolve a
dispute or problem with an ASP member, but does not provide technical support
for members' products. Please write to the ASP Ombudsman at 545 Grover Road,
Muskegon, MI 49442 USA or send a Compuserve message via Compuserve Mail to
ASP Ombudsman 70007,3536.



 January 7, 2018  Add comments

Leave a Reply