home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
TODDY600.ZIP
/
TODDY.DOC
< prev
Wrap
Text File
|
1993-10-27
|
85KB
|
1,746 lines
Toddy
A DOS Command Line Editor
by
Eric Tauck
1304 Deerpass Road
Marengo, IL 60152-9644
U.S.A.
Compuserve: 72457,1557
Internet: 72457.1557@compuserve.com
Toddy is a terminate and stay resident (TSR) utility that en-
hances the entry and editing of DOS commands, saves commands for
later retrieval, and provides resident macros that work like
simple batch files. Only certain programs that use DOS for
input, like COMMAND.COM or DEBUG.COM, will be affected by Toddy.
Toddy will work on any PC compatible running DOS 2.0 or greater.
Toddy may be used and distributed freely.
Installation
------------
Toddy is installed by running it from the command line. The
features of Toddy are available upon installation. Toddy is
usually installed from the AUTOEXEC.BAT file when the computer is
booted up. If you get the message "Multiplex number in use by
another program" when you try to install Toddy, see the /M switch
described in the Switch Descriptions section.
Toddy needs about 25000 bytes of memory to install, but shrinks
to 6624 bytes when it becomes resident. The resident memory
usage changes according to the settings of the /B, /HS, /KS, /MN,
/MS, /NS, /VL, and /VN switches. If you get the message "Not
enough memory" when loading Toddy high, try loading Toddy before
other TSR's.
The appearance of Toddy (the colors and cursor types) can be set
with the /AC, /AE, /AT, /TC, /TE, /TI, /TO, /TS, and /TX switch-
es. By default, Toddy sets all the colors to white on black and
does not modify the cursor type.
The key assignments of Toddy can be changed using key macros.
Throughout this document, commands are referred to by specific
keystrokes, however these are only the default key assignments
and may be changed.
All changes you make to Toddy (colors, key assignments, macros,
etc. ) can be saved and restored using the /OW, /OR, and /W
switches.
Once installed, Toddy may be disabled with the /D switch and
enabled with the /E switch. These switches might be useful if an
application conflicts with Toddy. Toddy may also be removed from
memory with the uninstall switch (/U).
The end of this document contains a list of version changes and
some additional notes on using and configuring Toddy.
Editing
-------
Toddy's enhanced editing commands are available immediately upon
installation. When entering a DOS command, use the right and
left arrow keys to move the cursor non-destructively. Past
commands can be retrieved by pressing the up and down arrow keys,
or by typing a few letters and searching for a matching command
with the Tab key. You can quickly enter the name of an existing
file by typing part of the name and pressing F9 until the entire
name is displayed. The standard DOS editing keys (F1 to F6) may
also be used.
In the next table and throughout the rest of this document, a
"Ctrl-" to the immediate left of a keystroke or letter refers to
that keystroke being pressed while the CONTROL key is held down.
Similarly, an "Alt-" next to a keystroke refers to the keystroke
being pressed while the ALT key is held down. A complete list of
editing commands follows:
Left move cursor left
Right move cursor right
Home move cursor to first column
End move cursor to last column
Ctrl-Left move cursor to previous word
Ctrl-Right move cursor to next word
Delete delete character under the cursor
Backspace delete character to the left of the cursor
Ctrl-Backspace delete word to the left of the cursor
Ctrl-Home delete all characters left of the cursor
Ctrl-End delete all characters right of the cursor
Escape delete all characters on the line
Up load older history line
PgUp load oldest history line
Down load newer history line
PgDn load newest history line (last line saved)
Tab search for next matching history line
Shift-Tab search for previous matching history line
Alt-F7 delete all history lines
F9 replace word with next matching file name
Shift-F9 replace word with previous matching file name
F10 append matching file name
Enter accept input
Ctrl-Enter accept input without any processing
Insert toggle insert mode
Ctrl-L delete word to the left of the cursor
Ctrl-R delete word to the right of the cursor
Ctrl-D delete current history line
Ctrl-K copy current line to history then clear line
Ctrl-V enter a control character
F1 copy next character from the template
F2 copy template characters up to the next key
F3 copy remaining characters from the template
F4 skip template characters up to the next key
F5 copy current input to the template
F6 insert EOF character
To enter control characters normally interpreted by DOS or Toddy,
press Ctrl-V and then the letter. For instance, press Ctrl-VC to
enter Ctrl-C. Toddy displays control characters using the ASCII
character, for instance a ^C (which is ASCII code 3) shows up as
a little heart. Besides the control keys listed above (Ctrl-L,
Ctrl-R, Ctrl-D, Ctrl-K, and Ctrl-V), some other codes that can
only be entered using Ctrl-V include: Ctrl-C (break), Ctrl-M
(enter), Ctrl-P (toggle line printer echo) and Ctrl-S (pause
display). Note that Toddy does not allow the NUL code (Ctrl-@)
to be entered.
File Name Completion
--------------------
The file name completion feature lets you quickly enter the name
of an existing file. Just type the first few letters of the file
name and press F9. The first file matching those letters will
replace the letters. Pressing F9 again will replace the first
matching file with the next matching file. If there are no more
matching files, pressing F9 does nothing. Shift-F9 replaces the
last match with the previous match. F10 works similarly to F9,
except matching files are appended to the last match (rather than
replacing it).
The initial search pattern may include wildcard characters and
may or may not include a file name extension. The /NT switch
determines the files types matched (i.e. normal, hidden, system,
and/or directories), and the /NU and /NL switches control whether
matching files are displayed in upper or lowercase letters. If
you enable directory matching using the /NT switch, directories
will be displayed with a trailing backslash. This backslash can
be enabled or disabled with the /NB and /NC switches. By de-
fault, only normal files are matched and matching files are
displayed in uppercase.
Command History
---------------
Every time you execute a DOS command, the command is copied to
the command history for later retrieval. If there isn't enough
room because of previously saved commands, Toddy will delete the
oldest command or commands to make room. You can prevent a
command from being saved to the command history by pressing
Ctrl-Enter (instead of Enter) to run the command. You can copy a
command to the command history without running it by pressing F5
or Ctrl-K. The up arrow key will retrieve the last command.
Repeatedly pressing the up arrow key will retrieve progressively
older commands. The down arrow key retrieves newer commands (the
opposite of the up arrow key). Other keys for scrolling through
the command history are listed in the Editing section above.
Commands are not saved to the command history if they are identi-
cal to the last command. Also, Toddy can be configured to pre-
vent other types of commands from being saved. See the descrip-
tions of the /HM, /HU, and /HA switches in the Switch Descrip-
tions section. Alternatively, previous commands can be automati-
cally removed from the command history using the /HP, /HI, /HD,
/HK switches. The command history may be written to a file or
loaded from a file with the /HW and /HR switches. The current
history can be locked, freed (unlocked), or cleared with the /HL,
/HF, and /HC switches. When the history is locked, commands are
no longer copied to it.
The command history can be searched by matching the beginning
characters. For instance, if you recently entered a long command
like:
tcc -v -ms zorro init.obj graflib.lib extra.lib
you can search for this line by typing the first few characters,
"tcc" for instance, and then pressing the Tab key. If there is
more than one saved command that begins with "tcc", repeatedly
pressing Tab will find each occurrence. If there are no more
occurrences, the display will not change. You can search in the
reverse direction with Shift-Tab. Searching in reverse is par-
ticularly useful if you've accidentally searched past the command
you were looking for by pressing the Tab key too many times.
When using the up or down arrow keys to scroll through the com-
mand history, Toddy will "wrap around" from the oldest entry to
the newest, or from the newest to the oldest. Toddy loads a
blank line just before wrapping.
If you've just run a command from the history without modifying
it and you press the down arrow key before anything else, Toddy
will load the command from the history that follows the command
you just ran. This is referred to in this document as "history
trace." History tracing is useful for reentering multiple com-
mands. For instance, if you've recently entered the commands:
COPY *.* A:
DEL *.*
and you want to run these two commands again, first find the COPY
command by typing "co" and pressing Tab. When the COPY command
is displayed, run it. Now you can recall the DEL command just by
pressing the Down arrow key.
Command History Window
----------------------
If you run Toddy without any command line arguments and Toddy has
already been installed, Toddy will display a window in the
center of the screen showing all the commands currently saved in
the command history. The Up and Down arrow keys scroll through
the list one line at a time, the Page-Up and Page-Down keys
scroll through the list a page at a time, and the Home and End
keys go to the first (oldest) and last (newest) commands.
When you've found a command you want run or edit, position the
command to the highlighted center of the window and press the
Enter key. The window will close and the command will be pre-
loaded to the input line.
The colors of the command window can be set with the /AB, /AH,
and /AX switches. Toddy automatically selects a size for the
window based on the current text mode, but you can explicitly
select a size with the /SR and /SC switches.
Unlike other aspects of Toddy, the history window manipulates the
hardware directly and may not work on non-standard video systems.
Chained Commands
----------------
The chain character allows you to enter multiple commands on a
single line. The default chain character is Ctrl-T, but may be
changed with the /CC switch. If the chain character was defined
to be the caret (^), the command "arce files1^arce files2" will
run the two consecutive commands "arce files1" and "arce files2".
Any number of chained commands may be entered on a single line.
Macros (described later) may also contain chained commands.
Within macros and in the run command (/R), you can use $t to
chain commands together.
Press Ctrl-Break to cancel a sequence of executing chained com-
mands. Pressing Ctrl-Break may interrupt a sequence of chained
commands even when you are inside an application.
Macros
------
A macro is a user defined command that's automatically replaced
by a single command or multiple commands chained together.
Macros behave like small batch files. Some advantages of macros
over batch files are that macros are executed faster (because
they're stored in memory, not on disk), macros generally use less
disk space (because multiple macros can be stored in a single
file), macros can be defined or redefined on the fly, and macros
can have any name (for example you could have a macro called DIR,
but not a batch file). Some possible uses for macros are renam-
ing commands (like defining D to execute a DIR) and applying
default arguments to commands (for instance automatically apply-
ing the /W switch to all DIR commands). Macros will NOT work in
batch files. Macros are defined with the /MD and /ME switches
and cleared with the /MU, /MF, and /MC switches. Macros can also
be defined using the syntax:
TODDY macro=text
where "macro" is the name of the macro and all characters after
the equal sign are what the macro does. This second syntax for
defining macros is equivalent to the /ME switch. Similarly, a
macro can be undefined with the syntax:
TODDY macro=
You can also load and save macros to files with the /MR and /MW
switches. Use the /ML switch to list the currently defined
macros. Some simple macros might be:
TODDY d=dir
TODDY dir=dir /w
TODDY /md'clear'del *.obj $t del *.lst $t del *.map'
The first example above makes D act like a DIR command. The next
example automatically applies the /W switch to all DIR commands.
The last example creates a CLEAR command to delete all OBJ, LST,
and MAP files from the current directory. The first two examples
use one format for defining macros and the third example uses the
other format. The third example uses the special character
sequence "$t" to chain multiple commands together.
Macros can access command line arguments in the same way as batch
files. The first 99 arguments are retrieved using the parameters
$1 to $99. The special parameter $* returns all arguments start-
ing after the largest previously retrieved argument. For in-
stance, if you referred to $11 in your macro, a $* will return
all arguments starting with $12. Also, you can return all argu-
ments starting with a particular argument number using the syntax
$n*, where "n" is the starting argument number. For instance,
$7* will return all arguments starting with the seventh. The
character indicating a parameter, a dollar sign by default, can
be changed with the /CP switch; and the character for multiple
arguments, a asterisk by default, can be changed with the /CM
switch.
A more useful definition of the DIR macro above would use a
parameter as follows:
TODDY dir=dir $1 /w
With this macro definition, a DIR without arguments would expand
to "DIR /W", and a "DIR *.COM" would expand to "DIR *.COM /W".
Another example:
TODDY tcc=tcc -v $* userlib.lib
This macro replaces TCC with one that automatically specifies
multiple command line arguments. If you ran "tcc -O zipper",
you'd actually be running "tcc -v -O zipper userlib.lib".
In addition to the $t used earlier, there are several other
special parameters:
$$ replaced with parameter character ($)
$b replaced with bar (|)
$l replaced with less-than (<)
$g replaced with greater-than (>)
$q replaced with removable quote (see Quotes section)
$s parameter sink
The first five parameters above are simply replaced by the speci-
fied character. These parameters are necessary if you are creat-
ing a macro at the DOS prompt or in a batch file, because Toddy
normally uses and absorbs the parameter and quote character, and
DOS normally uses and absorbs the bar, greater, and less-than
characters. The parameter sink works like the $* parameter
except an empty string is returned. The parameter sink is some-
times necessary because Toddy automatically appends unreferenced
trailing arguments, as if there was $* automatically appended all
macros. To suppress any trailing arguments, you must use the
parameter sink. See the two DIR macros below for an example of
using the $s parameter. All of the special parameters using a
letter can use an upper or lowercase letter.
You can also expand a macro within the body of another macro. To
do this, place the name of the macro to be expanded in parenthe-
ses after a dollar sign. For instance:
TODDY diropt=/w
TODDY dir=dir $* $(diropt)
In this example, the DIR switches are saved in the macro "diropt"
and then added to the end of the "dir" macro. Now you could
change the switches used in the dir macro simply by changing the
diropt setting. This document refers to macros used in this
manner as variables. The characters used to enclose the macro
name (parentheses) can be changed with the /CV and /CW switches.
Macros may be defined multiple times. The most recent definition
always takes precedence. A macro may also call another macro.
If a macro calls a macro of the same name, the most recent defi-
nition (prior to the calling macro) will be called. For in-
stance, if the following macros were defined:
TODDY dir=dir $* /w
TODDY dir=cls $s $t dir $*
a DIR command will call the second macro (because it's the most
recent definition). This macro clears the screen (with CLS) and
calls DIR. Since DIR has an earlier definition (the first
macro), it's also called as a macro. The net effect of running a
DIR command after defining the two macros above is to clear the
screen and perform a DOS DIR command with the /W switch. The
parameter sink ($s) is necessary in the second macro to prevent
any arguments from being appended to the CLS command.
If a command is preceded by the "literal character," it is not
interpreted as a macro. The literal character is undefined by
default, but can be defined with the /CL switch. If the literal
character was defined to be an exclamation mark, running "!DIR"
will execute the standard DOS directory command regardless of any
DIR macro definitions.
Toddy beeps, cancels all running macros, and returns an empty
input line if: 1. the macros are nested too deeply, 2. the macro
expansion is too long, or 3. the quote parameter ($q) or chain
parameter ($t) are used and no quote or chain character is de-
fined. The macro expansion may be too long internally (see the
/B switch) or too long for the command line (127 bytes for COM-
MAND.COM, and 255 bytes for 4DOS and NDOS). A potential macro
nest problem is circular macro references. For instance:
TODDY a=b
TODDY b=a
You will always get an error if you try to run one of these two
macros because these macros continuously call each other until
the macro nest level is exceeded.
Quotes
------
Macro arguments are defined as sequences of characters separated
by spaces, so there's no way retrieve an argument that contains
spaces unless you use quotes. All characters inside and includ-
ing double quotes (") are treated as a single argument. For
instance, if you defined the following macro:
TODDY g=grep $1 *.*
the following command will work properly because quotes are used:
g "a blank"
Toddy recognizes two kinds of quotes: text and removable. Text
quotes work as described above and removable quotes work similar-
ly, but are removed when the line is evaluated. The default
removable quote is the back quote character (`). If you defined
the following macro:
TODDY e=echo ($1)
running:
e `a b c d`
will display:
(a b c d)
Chain characters are not evaluated inside of quoted arguments,
but parameters ($1, $2, $t, etc.) are. If you want to use the
parameter character inside of a quoted string, use the special
parameter $$.
The text and removable quote characters can be redefined with the
/CX and /CQ switches. You can also define a second text quote
character with the /CY switch.
Key Macros
----------
Key macros are similar to normal macros, but are assigned to and
invoked by a keystroke. Key macros can perform operations spe-
cific to Toddy (like moving the cursor or modifying the command
history), running DOS commands, or some combination of both. All
the default Toddy key assignments are saved as key macros, and
may be changed. Key macros may consist of any combination of
normal letters (like '5' and 'B'), non-printable keys (like Enter
and F1), and internal commands (like 'HistoryOlder' and 'Delete-
Line'). Key macros are defined the same way as normal macros.
The first part of a key macro is always the key that is to be
reassigned. You can only reassign the "non-printable" keys, like
Ctrl- and Alt- key combinations, the function keys, arrow keys,
Enter, Tab, etc. Key macros are defined with the /KD and /KE
switches and cleared with the /KF, /KU, and /KC switches. Key
macros can also be defined using the syntax:
TODDY key=text
where "key" is an assignable key and all characters after the
equal sign are the characters that should be typed or commands
that should be performed. This second syntax for defining key
macros is equivalent to the /KE switch. Similarly, a key macro
can be undefined with the syntax:
TODDY key=
You can also load and save key macros to files with the /KR and
/KW switches. Use the /KL switch to list the current key assign-
ments.
You may define multiple assignments for the same key, however
only the most recent assignment is active. Defining a key macro
that refers to itself will cause an infinite loop, though Toddy
will usually detect this situation and abort the key macro. You
can also press Ctrl-Break to abort a key macro.
Non-printable keys and internal commands are specified using
special names in brackets. The following is a complete list of
key names. These are the keys that can be reassigned and used
within the body of key macros:
[Backspace] [Alt-D] [Shift-F4]
[Tab] [Alt-E] [Shift-F5]
[Enter] [Alt-F] [Shift-F6]
[Escape] [Alt-G] [Shift-F7]
[Shift-Tab] [Alt-H] [Shift-F8]
[Ctrl-Enter] [Alt-I] [Shift-F9]
[Ctrl-Slash] [Alt-J] [Shift-F10]
[Ctrl-Minus] [Alt-K] [Ctrl-F1]
[Ctrl-Backspace] [Alt-L] [Ctrl-F2]
[Alt-Minus] [Alt-M] [Ctrl-F3]
[Alt-Equal] [Alt-N] [Ctrl-F4]
[Ctrl-2] [Alt-O] [Ctrl-F5]
[Ctrl-6] [Alt-P] [Ctrl-F6]
[Alt-0] [Alt-Q] [Ctrl-F7]
[Alt-1] [Alt-R] [Ctrl-F8]
[Alt-2] [Alt-S] [Ctrl-F9]
[Alt-3] [Alt-T] [Ctrl-F10]
[Alt-4] [Alt-U] [Alt-F1]
[Alt-5] [Alt-V] [Alt-F2]
[Alt-6] [Alt-W] [Alt-F3]
[Alt-7] [Alt-X] [Alt-F4]
[Alt-8] [Alt-Y] [Alt-F5]
[Alt-9] [Alt-Z] [Alt-F6]
[Ctrl-A] [Left] [Alt-F7]
[Ctrl-B] [Right] [Alt-F8]
[Ctrl-C] [Up] [Alt-F9]
[Ctrl-D] [Down] [Alt-F10]
[Ctrl-E] [PageUp]
[Ctrl-F] [PageDown]
[Ctrl-G] [Home]
[Ctrl-H] [End]
[Ctrl-I] [Ctrl-Left]
[Ctrl-J] [Ctrl-Right]
[Ctrl-K] [Ctrl-PageUp]
[Ctrl-L] [Ctrl-PageDown]
[Ctrl-M] [Ctrl-Home]
[Ctrl-N] [Ctrl-End]
[Ctrl-O] [Insert]
[Ctrl-P] [Delete]
[Ctrl-Q] [F1]
[Ctrl-R] [F2]
[Ctrl-S] [F3]
[Ctrl-T] [F4]
[Ctrl-U] [F5]
[Ctrl-V] [F6]
[Ctrl-W] [F7]
[Ctrl-X] [F8]
[Ctrl-Y] [F9]
[Ctrl-Z] [F10]
[Alt-A] [Shift-F1]
[Alt-B] [Shift-F2]
[Alt-C] [Shift-F3]
You may not be able to assign some the keys above (like Ctrl-S
and Ctrl-P) unless you use the /KT switch. Some possible keys
are not listed (like [F11] and [F12]) because DOS doesn't recog-
nize these keys. Key macros may also directly call many internal
Toddy commands. The following is a complete list of available
internal commands:
[CursorLeft] move the cursor left
[CursorRight] move the cursor right
[CursorNext] move the cursor to the next word
[CursorPrevious] move the cursor to the previous word
[CursorHome] move the cursor to the start of the line
[CursorEnd] move the cursor to the end of the line
[DeleteCharacter] delete the character under the cursor
[DeleteBackward] delete the character left of the cursor
[DeleteNext] delete the word left of the cursor
[DeletePrevious] delete the word right of the cursor
[DeleteHome] delete all characters left of the cursor
[DeleteEnd] delete all chars right of the cursor
[DeleteLine] delete entire line
[InsertOn] turn insert mode on
[InsertOff] turn insert mode off (overwrite mode)
[InsertToggle] toggle the insert state
[HistorySkip] don't add line to history when run
[HistoryReset] add line to history when run
[HistoryAdd] add line to history right now
[HistoryDelete] delete current history line
[HistoryClear] erase the entire history
[HistoryOlder] load the next older history line
[HistoryNewer] load the next newer history line
[HistoryTrace] load the next older history trace line
[HistoryOldest] load the oldest history line
[HistoryNewest] load the newest history line
[HistoryForward] search newer history entries
[HistoryBackward] search older history entries
[NameForward] find next matching file name
[NameBackward] find previous matching file name
[NameAppend] find next matching file name and append
[TemplateCharacter] load next DOS template character
[TemplateAppend] append rest of DOS template
[TemplateInsert] insert DOS template characters
[TemplateSkip] skip DOS template characters
[TemplateEOF] insert EOF character
[Run] run the current command
[RunDirect] run raw command (no processing)
[Mask] next letter is control character
You can also insert a literal character by placing a number (the
ASCII code of the character) in brackets. For instance, you can
insert a Tab character (ASCII code 9) with [9]. Note: for ASCII
code 13 (carriage return), you must use "[Mask]M" instead. The
characters used to surround key names, internal commands, and
literal characters, which are brackets by default, can be changed
with the /CB and /CE switches.
The default key macros / assignments are:
[Left]=[CursorLeft]
[Right]=[TemplateCharacter]
[Up]=[HistoryOlder]
[Down]=[HistoryTrace]
[Home]=[CursorHome]
[End]=[CursorEnd]
[PageUp]=[HistoryOldest]
[PageDown]=[HistoryNewest]
[Ctrl-Left]=[CursorPrevious]
[Ctrl-Right]=[CursorNext]
[Ctrl-Home]=[DeleteHome]
[Ctrl-End]=[DeleteEnd]
[Ctrl-PageUp]=[HistoryOldest]
[Ctrl-PageDown]=[HistoryNewest]
[Tab]=[HistoryBackward]
[Shift-Tab]=[HistoryForward]
[Backspace]=[DeleteBackward]
[Ctrl-Backspace]=[DeletePrevious]
[Insert]=[InsertToggle]
[Escape]=[DeleteLine]
[Delete]=[DeleteCharacter]
[Enter]=[Run]
[Ctrl-Enter]=[HistorySkip][RunDirect]
[F1]=[TemplateCharacter]
[F2]=[TemplateInsert]
[F3]=[TemplateAppend]
[F4]=[TemplateSkip]
[F5]=[HistoryAdd][DeleteLine]
[F6]=[TemplateEOF]
[Alt-F7]=[HistoryClear]
[F9]=[NameForward]
[Shift-F9]=[NameBackward]
[F10]=[NameAppend]
[Ctrl-D]=[HistoryDelete]
[Ctrl-K]=[HistoryAdd][DeleteLine]
[Ctrl-L]=[DeletePrevious]
[Ctrl-R]=[DeleteNext]
[Ctrl-V]=[Mask]
Some systems assign Tab (instead of F9) to file name matching.
To switch F9 and Tab, use the following key macros:
[Tab]=[NameMatch]
[Shift-Tab]=[NamePrevious]
[F9]=[HistoryReverse]
[Shift-F9]=[HistoryForward]
Since searching with a blank line finds all occurences, you may
want to assign the up and down arrow keys to forward and reverse
command history searching:
[Up]=[HistoryReverse]
[Down]=[HistoryForward]
The default assignments for PageUp (and PageDown) may not be very
useful, so try the following assignment for PageUp:
[PageUp]=[DeleteLine]toddy[Enter]
You can implement the basic Wordstar commands commands with the
following assignments:
[Ctrl-S]=[CursorLeft]
[Ctrl-D]=[CursorRight]
[Ctrl-E]=[HistoryOlder]
[Ctrl-X]=[HistoryNewer]
[Ctrl-A]=[CursorPrevious]
[Ctrl-F]=[CursorNext]
[Ctrl-G]=[DeleteCharacter]
[Ctrl-Y]=[DeleteLine]
To use the Wordstar key Ctrl-S listed above, you will probably
have to use the /KT (and possibly /BS) switch first.
Switches
--------
Switches are used to configure Toddy before or after it has been
installed. A summary of the Toddy command line switches can be
displayed by running:
TODDY /?
In the switch descriptions of the following sections, "d" denotes
a decimal digit, "x" denotes a hexadecimal digit, "'s'" denotes a
string in quotes, and "file" denotes a file name. The number of
decimal or hexadecimal digits serve only as a general reference
to the magnitude of the expected number -- in most cases fewer
digits are allowed.
Switch Summary
--------------
Installation:
/Bddddd input buffer size
/BSddd restricted input buffer size
/Mddd multiplex number
/Q quiet mode
/V verbose mode
/E enable Toddy
/D disable Toddy
/U uninstall Toddy
/W write switches to TODDY.COM
/ORfile read configuration file
/OWfile write configuration file
/KTd keyboard input type
/UI uppercase ignored
/US uppercase significant
/WU public Windows data
/WP private Windows data
Attributes (colors):
/ATxx text attribute
/ACxx cursor attribute
/AExx end attribute
/ABxx command window border
/AHxx command window highlight
/AXxx command window text
Cursor Type:
/TC use custom cursor
/TS use system cursor
/TExxxx entry cursor type
/TIxxxx insert cursor type
/TOxxxx overwrite cursor type
/TXxxxx exit cursor type
Characters:
/CBddd key command begin character
/CEddd key command end character
/CVddd start of variable character
/CWddd end of variable character
/CQddd quote character
/CXddd text quote character one
/CYddd text quote character two
/CPddd parameter character
/CMddd multiple argument character
/CLddd literal character
/CCddd chain character
Insert Mode:
/II select insert mode
/IO select overwrite mode
/IR reset insert
/IP preserve insert
File Name Completion:
/NSddddd file name match size
/NTxx file name match types
/NL display names in lowercase letters
/NU display names in uppercase letters
/NC clean directory name
/NB add backslash to directory name
History Window:
/S select a command (open window)
/SCddd window columns
/SRddd window rows
History:
/HSddddd command history size
/HMddd minimum command length
/HP pure command history
/HI impure command history
/HD delete command from history when run
/HK keep command in history when run
/HU save unique commands
/HA save all commands
/HL lock history
/HF free history
/HN no history trace recover
/HT history trace recover
/HC clear history
/HRfile read history from file
/HWfile write history to file
Macros:
/MSddddd macro table size
/MNddd maximum macro nest
/MD's's' define macro
/ME's's' exchange (replace) macro
/MU's' undefine macro
/MF's' forget macro
/MC clear all macros
/ML list macros
/MRfile read macros from file
/MWfile write macros to file
Key Macros:
/KSddddd key macro stack size
/KD's's' define key macro
/KE's's' exchange key macro
/KU's' undefine key macro
/KF's' forget key macro
/KC clear all key macros
/KL list key macros
/KRfile read key macros from file
/KWfile write key macros to file
Variables:
/VLddd maximum variable length
/VNddd maximum variable nest
Miscellaneous:
/A display memory allocations
/R's' run a command
Switch Descriptions
-------------------
/A Display memory allocations. The first three numbers
displayed are the memory allocated for the command
history, macro defintions, and file name completion.
The next three numbers are the total heap memory
(usually the sum of the first three numbers), the
memory used by macro definitions, and the amount of
available heap memory. The next four numbers are the
maximum macro nest, size of variable data areas, the
keyboard stack size, and the input buffer size. The
last number is the total bytes used by all the data
areas. All available heap memory can be used for
macros. Key macros are allocated from the same pool of
memory as normal macros. Whatever memory isn't used by
macros is used for the command history (or the file
name completion commands if needed). See the Notes
section for more information on memory usage.
/ABxx Set the attribute of the command history window border.
The /AC switch describes attribute bytes. The default
is /AB7.
/ACxx Set the attribute of the character under the cursor.
The first digit of the attribute byte is the background
color and the second digit is the foreground color.
Color values of 0 to 7 correspond to black, blue, green
cyan, red, magenta, brown, and white. Adding 8 to the
lower digit makes the foreground color brighter.
Adding 8 to the upper digit usually makes the fore-
ground blink. The default is /AC7 (white on black).
/AExx Set the attribute of the blanks following the text.
The /AC switch describes attribute bytes. The default
is /AE7.
/AHxx Set the attribute of the command history select line
(i.e. the "highlight" color). The /AC switch describes
attribute bytes. The default is /AH70.
/ATxx Set the attribute of the text. The /AC switch de-
scribes attribute bytes. The default is /AT7.
/AHxx Set the attribute of the command history text. The /AC
switch describes attribute bytes. The default is /AX7.
/Bddddd Set the input buffer size. This is the number of bytes
reserved for entering commands and expanding macros.
If there is an error running a macro, you may have to
make this number larger. The minimum value is 255 and
the default is /B512. If you don't use macros, or only
use short macros, you could conserve memory by reducing
this number to the minimum.
/BSddd Set the restricted input buffer size. If this switch
is used, Toddy will only process input when the speci-
fied number of characters are requested. This switch
is particularly useful in disabling Toddy when running
several DOS commands, like LABEL, DEBUG, and FORMAT.
If you are using type 7 input (see the /KT switch), you
may have to use the /BS switch to enable Ctrl-Break
within these DOS commands. If you are using 4DOS or
NDOS, use /BS255, otherwise use /BS128. The default is
/BS0 (unrestricted input size).
/CBddd Define key command begin character. This is the char-
acter that starts one of the special names (keys or
internal commands) used by key macros. The number is
the ASCII code of the character. The default is /CB91
(a left bracket).
/CCddd Define the chain character. The chain character is
used to enter multiple commands on single line or in a
macro. The number is the ASCII code of the character.
The chain character cannot be a space. The default is
/CC20 (Ctrl-T).
/CEddd Define key command end character. This is the charac-
ter that ends one of the special names (keys or inter-
nal commands) used by key macros. The number is the
ASCII code of the character. The default is /CE93 (a
right bracket).
/CLddd Define the literal character. A literal character
forces Toddy to pass a command directly to DOS without
interpreting it as a macro. The number is the ASCII
code of the character. The literal character cannot be
a space. The default is /CL0 (no literal character
defined).
/CMddd Define the multiple argument character. The multiple
argument character is used with regular macro parame-
ters to refer to all following arguments. The number
is the ASCII code of the character. The multiple
argument character cannot be a space. The default is
/CM42 (an asterisk).
/CPddd Define the parameter character. This is the character
used to specify parameters within macros. The number
is the ASCII code of the character. The parameter
character cannot be a space. The default is /CP36 (a
dollar sign).
/CQddd Define the removable quote character. This character
is primarily used to delimit macro parameters contain-
ing spaces or chain characters. The number is the
ASCII code of the character. The default is /CP96 (a
back quote).
/CVddd Define the variable begin character. This is the
character that starts a name of a macro that is to be
expanded inside the body of another macro. The number
is the ASCII code of the character. The default is
/CV40 (a left parenthesis).
/CWddd Define the variable end character. This is the charac-
ter that ends the name of a macro that is to be expand-
ed inside the body of another macro. The number is the
ASCII code of the character. The default is /CW41 (a
right parenthesis).
/CXddd Define the text quote character. This character delim-
its macro parameters containing spaces or chain charac-
ters. The number is the ASCII code of the character.
The default is /CP34 (a double quote).
/CYddd Define the alternate text quote character. This char-
acter delimits macro parameters containing spaces or
chain characters. The number is the ASCII code of the
character. The default is /CP0 (undefined).
/D Disable the resident Toddy. All command input will be
performed by DOS as if Toddy wasn't installed.
/E Enable the resident Toddy. This switch turns off the
/D switch.
/HA Save all commands to the command history. This switch
turns off the /HU switch. This is the default.
/HC Clear command history. All saved commands are deleted.
If you want to save a sequence of DOS commands as a
batch file (with the /HW switch), you could use this
switch to first clear any previously saved commands.
You can also clear the command history by pressing
Alt-F7.
/HD Command history delete. When a command is selected and
run from the command history, it is deleted from the
command history (though it will usually be saved back
to the top of the history). The difference between
this switch and /HP is that this switch only deletes a
previous command when it has been selected, while /HP
deletes previous (identical) commands whether they've
been selected or you've typed in a new command from
scratch. This is switch is the default.
/HK Command history keep. Commands that are selected and
run from the command history will not be deleted. This
switch turns off the /HD switch.
/HF Free the command history. Commands will be saved to
the command history normally. This switch turns off
the /HL switch.
/HI Impure command history. Identical commands will not be
deleted from the command history. This switch turns
off the /HP switch.
/HL Lock the command history. This switch prevents further
commands from being saved to the command history. You
can unlock the history with the /HF switch.
/HMddd Set the minimum command length. All commands that are
shorter than this value are not saved to the command
history. This switch is useful if you don't want to
save trivial commands like DIR or CLS. The default is
/HM0 (all commands are saved).
/HN No history trace recover. If the history cannot be
traced from the last command, the down arrow key will
do nothing.
/HP Pure command history. This switch forces Toddy to
delete all duplicate saved commands in the command
history, and when a new command is saved, to check for
and delete any previously saved identical commands.
/HRfile Read the command history from a file. Each line of the
specified file is added to the command history. If the
command history is not large enough, older lines are
deleted to make room. The normal criteria for saving
commands (like minimum length) are ignored. The file
may be created from scratch or be a previously saved
history. The file must be a standard text file.
/HSddddd Set the command history size. The command history size
is the number of bytes reserved for saving commands.
If you don't use the command history, you can conserve
memory by setting the size to 0 with /HS0. The default
is /HS256.
/HT History trace recover. If the history cannot be
traced, the down arrow will load the next newer command
from the command history (or wrap around to the oldest
entry). This is the default setting.
/HU Save unique commands only. Toddy will scan the command
history and only save a command if it's different than
all the other saved commands. This switch has the
opposite effect of the /HA switch.
/HWfile Write the command history to a file. All commands
stored in the command history are written to the speci-
fied file. The commands are saved as a standard text
file. This switch can be used to run a sequence of DOS
commands and then save them as a batch file. The file
can also be reloaded with the /HR switch.
/II Select insert mode for editing. This is the default
mode.
/IO Select overwrite mode for editing.
/IP Preserve the insert/overwrite mode between commands.
The insert or overwrite mode is preserved from the last
time a command was entered. This switch has the oppo-
site effect of the /IR switch.
/IR Reset the insert/overwrite mode between commands. Each
time a command is entered, the mode will be set to
insert or overwrite (depending on the current mode when
this switch is used). This switch has the opposite
effect of the /IP switch. This is the default.
/KC Clear all key macro definitions. This switch can be
used to delete all currently defined key macros, or to
ignore any key macros saved to TODDY.COM when install-
ing.
/KD's's' Define a key macro. This parameter uses two fields,
the key name and the replacement text. The first
character after the /KD is the definition delimiter.
Though this delimiter is usually a quote (or double
quote), it can be any character not used in the key
name or replacement text. There are three delimiters:
one at the start of the key name, one separating the
key name from the replacement text, and one at the end
of the replacement text. The key name must be one of
the names listed in the Key Macros section. The re-
placement text can contain normal characters, other
keys, or internal commands. Note: this switch does not
remove any previous definitions of the key macro. Use
the /KE switch to replace the most recent definition of
a key macro. Key macros are described in the Key
Macros section.
/KE's's' Exchange a key macro. This switch replaces the most
recent definition of a key macro, which is equivalent
to undefining then defining a key macro. The syntax
and usage are identical to the /ED switch.
/KF's' Forget a key macro. This switch clears all definitions
of a key macro (not just the most recent definition).
The key name is delimited similarly to the key macro
definition switch (/KD), except there is no replacement
text. Use the /KU switch to clear only the most recent
definition.
/KL List key macros. All currently defined key macros will
be displayed.
/KRfile Read key macros from a file. The file must be a stand-
ard text file. The file may be created by the user or
by saving key macros with the /KW switch. Each line of
the file contains a single key macro definition. The
key macros must be defined in the form:
key=text
where "key" is the key to assign and "text" is the
replacement text of the key macro. All characters
after the first equals sign become part of the key
macro text.
/KSddddd Set the key macro stack size. The replacement text of
key macros is limited to this setting. This setting
does NOT affect the available space for saving key
macro definitions. Key macro definitions are saved in
the same area as regular macros. The minimum value is
2. The default is /KS128.
/KTd Set the keyboard input type. The two valid types are 7
and 8. Type 7 input allows processing of several keys
normally interpreted by DOS: Ctrl-C, Ctrl-P, and Ctrl-
S. However, type 7 input may not allow you to break
out of some DOS commands with Ctrl-Break. Type 8 input
does not allow you to process the keys above, but does
allow you to break out of programs normally. If you
use type 7 input, see the /BS switch. The default is
/KT8.
/KU's' Undefine a key macro. This switch clears the most
recent definition of a key macro. The key name is
delimited similarly to the key macro definition switch
(/KD), except there is no replacement text. Note that
a key macro may have multiple definitions and this
switch only clears the most recent. Use the /KF switch
to clear all definitions of a key macro.
/KWfile Write key macros to a file. All currently defined key
macros are written to the specified file. The file is
a standard text file with one key macro definition per
line. Key macros saved with this switch can be loaded
with the /KR switch.
/Mddd Set the multiplex number. If you get the message
"Multiplex number in use by another program" when you
try to install Toddy, you can change the multiplex
number with the /M switch. You should not set the
multiplex number after installing Toddy, and when you
do change the multiplex number, you should save the
setting with the /W switch. The multiplex number
should be in the range 192 to 255. The default is
/M215. To change the multiplex number to 240, before
installing Toddy, run:
TODDY /m240 /w
/MC Clear all macro definitions. This switch can be used
to delete all currently defined macros, or to ignore
any macros saved to TODDY.COM when installing.
/MD's's' Define a macro. This parameter uses two fields, the
macro name and the replacement text. The first charac-
ter after the /MD is the definition delimiter. Though
this delimiter is usually a quote (or double quote), it
can be any character not used in the macro name or
replacement text. There are three delimiters: one at
the start of the macro name, one separating the macro
name from the replacement text, and one at the end of
the replacement text. The macro name can be any se-
quence of characters, though it shouldn't contain any
spaces. The replacement text can contain any sequence
of characters. Note: this switch does not remove any
previous definitions of the macro. Use the /ME switch
to replace the most recent definition of a macro.
/ME's's' Exchange a macro. This switch replaces the most recent
definition of a macro, which is equivalent to undefin-
ing then defining a macro. The syntax and usage are
identical to the /MD switch.
/MF's' Forget a macro. This switch clears all definitions of
a macro (not just the most recent definition). The
macro name is delimited similarly to the macro defini-
tion switch (/MD), except there is no replacement text.
Use the /MU switch to clear only the most recent defi-
nition.
/ML List macros. All currently defined macros will be
displayed.
/MNddd Set maximum macro nest level. A nest level is used
whenever a macro calls another macro. If the maximum
nest level is reached while running a macro, Toddy will
beep and abort the macro. Toddy requires 4 bytes of
memory for each nest level. If you don't use macros,
you can conserve memory by setting the nest level to 0
with /MN0. The default is /MN10.
/MRfile Read macros from a file. The file must be a standard
text file. The file may be created by the user or by
saving macros with the /MW switch. Each line of the
file contains a single macro definition. The macros
must be defined in the form:
macro=text
where "macro" is the name of the macro and "text" is
the replacement text for the macro. All characters
after the first equals sign become part of the macro
text.
/MSddddd Set the macro table size. The macro table size is the
number of bytes reserved for macro definitions (includ-
ing key macros). The default is /MS512.
/MU's' Undefine a macro. This switch clears the most recent
definition of a macro. The macro name is delimited
similarly to the macro definition switch (/MD), except
there is no replacement text. Note that a macro may
have multiple definitions and this switch only clears
the most recent. Use the /MF switch to clear all
definitions of a macro.
/MWfile Write macros to a file. All currently defined macros
are written to the specified file. The file is a
standard text file with one macro definition per line.
Macros saved with this switch can be loaded with the
/MR switch.
/NB Backslashed directory names. Add a backslash to direc-
tory names inserted with F9 and F10. Note that you
must first use the /NT switch with the proper value to
match directory names. This is the default setting.
/NC Clean directory names. Don't add a backslash to direc-
tory names inserted with F9 and F10. This switch turns
off the /NB switch.
/NL Display file names in lowercase letters. This switch
makes file names inserted with the F9 and F10 keys
appear in lowercase letters.
/NSddddd File name size. This is the size of the area for
saving file names matched with F9 and F10, allowing you
to display previous matches with Shift-F9. There is a
105 byte (or so) overhead for file name matching, so if
you specify a number less than 105, the number will be
changed to zero. You can set this value to zero if you
don't use the file name completion commands. The
default is /NS256.
/NTxx Select the file types for file name completion. This
switch allows you to specify what types of files will
be matched by the file name completion commands (F9 and
F10). The possible values are: 00 = normal file, 02 =
hidden files, 04 = system files, and 10 = directories.
Add the hexadecimal values together to combine types.
/NT10 (00 + 10) finds all normal files and directories.
/NT06 (00 + 02 + 04) finds all normal, hidden, and
system files. /NT16 (00 + 02 + 04 + 10) finds all files
and directories. The default is /NT00 (find normal
files only).
/NU Display file names in uppercase letters. This switch
makes file names inserted with the F9 and F10 keys
appear in uppercase letters. This is the default
setting.
/ORfile Read configuration from a file. All switch settings,
macros, and key assignments are loaded. If no file
name is specified, the configuration will be loaded
from the file TODDY.CFG in the same directory as
TODDY.COM. Usually, the configuration file is created
with the /OW switch.
/OWfile Write configuration to a file. All switch settings,
macros, and key assignments are saved. This switch
does NOT save the command history (you can use the /HW
and /HR switches to save and load the command history).
If no file name is specified, the configuration will be
saved to the file TODDY.CFG in the same directory as
TODDY.COM. The configuration file TODDY.CFG will be
loaded automatically when Toddy is installed. Configu-
ration files can also be loaded explicitly with the /OR
switch. Configuration files are standard text files
with one switch per line, and can be created or modi-
fied with a standard text editor.
/Q Enable quiet mode. When Toddy is in quiet mode, the
regular confirmation messages are suppressed -- only
error messages are displayed.
/R's' Run a command. The specified command is preloaded to
the input buffer and the next time Toddy gets the
chance the command will be executed. If this switch is
used in batch file, the command will be run as soon as
the batch file terminates. The command is delimited
similarly to the macro definition switch (/MD), except
there is no replacement text.
/S Select a previous command. This switch opens the
command history window and lets you select a past
command by scrolling through the command history. Once
Toddy has been installed, running Toddy without any
command line arguments also performs this function.
/SCddd Set the number of columns used by the command history
window. This the number includes the border. The
default is /SC0, which tells Toddy to decide how many
columns.
/SRddd Set the number of rows used by the command history
window. This number includes the border. The default
is /SR0, which tells Toddy to decide how many rows.
/TC Use the custom cursor type defined with the /TE, /TI,
and /TO switches. The /TE, /TI, and /TO switches
automatically set this switch.
/TExxxx Set the entry cursor type. This switch sets both the
insert and overwrite cursor types. This switch should
be used instead of the /TI and /TO switches. The
cursor type is the size and shape of the blinking
cursor blob. The first byte of this two byte value is
the top scan line number and the second byte is the
bottom scan line number. The scan lines for CGA are
numbered 00 to 07, for EGA adapters it's 00 to 0D, and
for VGA adapters it's 00 to 0E. The default cursor is
usually the bottom two scan lines (i.e. 0607 for CGA,
0C0D for EGA, and 0D0E for VGA). You can make a big
blinking blob on most adapters with 000F. You can turn
off the blinking cursor entirely on most adapters with
value of 2000. The value FFFF is reserved by Toddy to
indicate that the cursor should not be modified.
/TIxxxx Set the insert cursor type. This is the cursor type
used when in insert mode. The /TE switch describes how
to set the cursor type.
/TOxxxx Set the overwrite cursor type. This is the cursor type
used when in overwrite mode. The /TE switch describes
how to set the cursor type.
/TS Use system cursor (i.e. don't make any changes to it).
This switch turns off all the custom cursor settings.
This is the default.
/TXxxxx Set exit cursor type. This is the cursor type to use
when Toddy has finished inputting a line. Generally,
this switch is used to restore the cursor after setting
it with the other cursor switches. For this and the
other cursor switches, if no cursor is specified, the
current system cursor will be used (i.e. this switch
usually isn't necessary).
/U Uninstall Toddy. This switch removes Toddy from memo-
ry. It may not be possible to uninstall Toddy if
another TSR has been loaded after Toddy.
/UI Uppercase letters are ignored. This switch turns off
the /UI switch and is the default setting.
/US Uppercase letters are significant. If this switch is
specified, Toddy will treat upper and lowercase letters
as being different. For instance, if you define a
macro called "DIR" and ran the command "dir", the macro
will NOT be run. This switch also affects command
history operations, like searches and saving unique
commands (the /HU switch). Note that DOS is NOT case-
sensitive -- this switch only affects Toddy.
/V Enable verbose mode. This switch turns off the /Q
switch and is the default setting.
/VLddd Set the maximum length of the names of macros to be
expanded within other macros. This number limits the
length of the macro name allowed in the $() macro
parameter, not the text that's expanded. The default
is /VL16.
/VNddd Set the maximum nest level of macros expanded within
other macros. Nest levels are used whenever a $()
parameter occurs within another $() parameter. The
default is /VN10.
/W Write current settings to TODDY.COM. All switches, key
assignments, and macros will be written the executable
file TODDY.COM. The settings will be the new defaults
the next time Toddy is installed. Macro definitions
may be removed from TODDY.COM by undefining the macro
and rewriting the settings. If you are running DOS
2.X, TODDY.COM must be in the current directory when
using this switch. Usually, the /OW switch is a better
method for saving the current settings.
/WU Force Windows to use a single copy of Toddy for all DOS
windows. Normally, Windows creates a separate copy of
Toddy for each DOS window. The advantage of using a
single copy of Toddy is that new commands saved to the
command history, changes to macros, and other settings
will be preserved from DOS session to DOS session, and
also remain intact after you exit Windows. DO NOT use
this switch if you open up more than one DOS window at
a time, because the two windows will interfere with
each other.
/WP Force Windows to use a separate copy of Toddy for each
DOS window. Changes to Toddy in one DOS window will
not affect Toddy in another DOS window. Also, any
changes you make to Toddy in a DOS window will will not
be preserved after you exit Windows. This switch turns
off the /WU switch. This switch turns off /WU and is
the default setting.
Examples
--------
TODDY
Install Toddy using the default switches.
TODDY /hs10000 /ms100 /to000f
Install Toddy with a 10000 byte command history, 100 byte macro
area, and set the cursor scan lines to a big blinking blob
whenever overwrite mode is in effect.
TODDY /at1F /ac4F /ae1F /te2000
Set the colors to a uniform bright white on blue with a red
block cursor. The blinking cursor is turned off for each
input.
TODDY /hs1000 /hm6 /ow
Write the /HS1000 and /HM6 switches to TODDY.CFG so they don't
need to be specified the next time Toddy is installed.
TODDY /md'dir'dir $* /w' /md'del'move $1 c:\trashcan' /cl33
Define two macros and set the literal character to an exclama-
tion mark. The first macro appends the /W parameter to all DIR
commands. The second macro makes the DEL command move files to
be deleted to a directory called TRASHCAN, where they can be
later retrieved if you change your mind about the deletion.
With the definition of the literal character, !DEL performs a
regular and permanent delete. The DEL macro requires a MOVE
utility, which isn't included with DOS prior to version 6, but
is available on many BBS's and online services.
TODDY /u
Remove Toddy from memory.
Version Changes
---------------
Version 2.00
First public release.
Version 2.01
Several command line switches renamed.
Version 2.10
Ctrl-Break implemented and mouse support removed to conserve
memory.
Version 2.11
Search command made case-insensitive.
Version 2.20
Cursor switches expanded.
Version 3.00
Complete rewrite. New features include chained commands and
macros. Other changes include: most command line switches
renamed, switches are automatically passed to a resident Toddy
(no /RS needed), default values changed, several editing keys
changed, delimiters for move word left and right changed, and
history search improved.
Version 4.00
Many new features added: macros and the command history may be
saved and loaded from a file, control characters can be en-
tered, Ctrl-Break cancels chained commands and macros, DOS
editing keys supported, file name completion, and more. Other
changes include: several editing keys changed, alternate syntax
for defining macros, switches must start with a slash (/),
macro parameter syntax slightly changed.
Version 5.00
Macro interpreter totally rewritten: previous restrictions with
regard to the $* parameter have been removed, parameters above
$9 are now $10 to $99, new special parameters introduced ($t,
$l, $g, etc), $n* parameter added, trailing arguments automati-
cally appended to macro expansion, the asterisk in the $* and
$n* parameters can be redefined. New features added: quoted
strings, command history window, comments in macro files,
preload a command to the input buffer (/R switch), and the /FL,
/FU, /HT, /HN switches. Other changes include: down arrow key
has new function (see /HT and /HN switches), macro definition
syntax "macro=text" and "macro=" replace and undefine macro
definitions, /Q affects banner without writing to file, new
memory configuration option /B, and suppresses system prompt
for phantom drives.
Version 5.01
Fixed a bug associated with the /TE /TI /TO /TX switches.
Version 5.10
Cursor is moved to the end of the line when loading commands
from the command history, the cursor isn't hidden in the selec-
tion window, and the allocation switch (/A) displays more
information.
Version 5.11
Fixed "Error in switches ..." message when using /S switch.
Version 6.00
New features: can redefine keys with key macros, opposite
direction command history search and file name matching, can
expand macros within body of other macros, backslash added to
directory names, better command history management. New
switches: /CB, /CE, /CV, /CW, /HD, /HI, /HK, /HP, /KC, /KD,
/KE, /KF, /KL, /KR, /KS, /KT, /KU, /KW, /NB, /NC, /NS, /OR,
/OW, /VL, /VN, /WU, /WP. Changed switches: /FT to /NT, /FU to
/NU, /FL to /NL; changed meaning of /HT and /HN. Fixed bugs:
DOS template commands, /R processing, delete current history
line (^D). Comment lines are no longer allowed in saved macro
files.
Notes
-----
Toddy performs the same function as the DOSKEY utility provided
with DOS version 5 and up. The two programs are somewhat macro
and keystroke compatible, though the command line switches are
totally different. By and large, Toddy has a lot more features
than DOSKEY but uses more memory.
Toddy will work with 4DOS (and the version of 4DOS licensed to
Symantec/Peter Norton Computing called NDOS), though the /L1
parameter must be set using the SETDOS command. When Toddy is
installed under 4DOS, many of 4DOS' features are still available,
including aliases and multiple commands on a single line. Toddy
is somewhat redundant when using 4DOS, since most of the features
of Toddy are available through 4DOS. If you use Toddy's /BS
switch, the setting for 4DOS must be /BS255.
You may have some trouble using redirected input with programs
like DEBUG and EDLIN when Toddy is installed. If Toddy receives
a redirected text file, Toddy will interpret both the carriage
return and linefeed, which are at the end of every text line, as
the Enter key. In effect, you'll get two Enters after every
line. To fix this problem, temporarily disable Toddy or use the
/BS switch to limit when Toddy is active. Redirected input is
sometimes used to assemble small programs using the DEBUG pro-
gram.
The memory allocated by the /HS, /MS, and /NS switches is as-
signed to a common pool called the heap. Any space not used by
macros (including key macros) is available for the command histo-
ry. If a file match command is used (F9 or F10), the oldest com-
mand history entries may be deleted to make room, though the file
matching commands will never use more than what it has been
allocated. You can display the current memory allocations with
the /A switch.
The DOS template commands (F1 to F6) use the most recent command
line stored in the command history, so if you plan on using these
keys, you should make sure that there is enough available heap
space to hold at least one command line.
Before Toddy is installed, all available memory is allocated to
the memory pool. If you run "TODDY /A" before installing Toddy,
the total allocated memory will usually be larger than the sum of
the first three numbers. This is the total bytes available for
the /B, /FS, /HS, /KS, /MS, /MN, /VL, and /VN switches.
Each command of a chained command is displayed as it is executed.
Only the final form of the command is displayed (that is, after
all macros have been processed). To see the see final form of
the first command, precede the chained commands with the chain
character. For instance, if you defined the following macro:
TODDY d=dir
when you run the "d" macro, you will not see the DIR command,
just the results of the DIR. If you wish to see the actual DIR,
define the macro as:
TODDY d=$s$tdir
You might have trouble using the DOS pipe and redirection com-
mands with macros because the macro parameters $* and $n* will
include such commands. For instance, if you define the following
macro:
TODDY d=dir $* /w
and then try run D and redirect the output with "d > file", the
macro will expand to "dir > file /w", which probably isn't what
you want. With most programs, you can solve this problem by
specifying the command line switches first, so define the macro
as:
TODDY d=dir /w $*
You can use the parameter character (the dollar sign by default)
in macro names, but if you call that macro from another macro,
you must use two parameter characters ($$). You can also use the
chain character in macro names, but you must put the macro name
in (removable) quotes to call it. Macro names cannot contain
spaces or removable quotes. If you use a quote before or within
the first field of a line, the quotes only affect the first field
(i.e. the command), not the arguments.
If you have saved macros to TODDY.COM (using the /W switch), use
the /MC switch to install Toddy without those macro definitions.
It will be necessary use the /MC switch to install Toddy with a
macro and history size of zero if you have saved macros in this
manner. The same applies to key macros and the /KC switch.
Maximum line length for all commands that read or write to a file
(/HR, /HW, /MR, etc) is 512. This limits the size of macros and
key assignments. Lines that are too long will generate a read
error.
DISCLAIMER OF WARRANTY
----------------------
THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS
HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
REPLACEMENT OR REFUND OF PURCHASE PRICE.