Dec 232017
Memory resident utility that works with text editor. It will take short text strings and expand them to defined long strings. It is very useful for programming.
File SHORT2.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Memory resident utility that works with text editor. It will take short text strings and expand them to defined long strings. It is very useful for programming.
File Name File Size Zip Size Zip Type
ASM.SHR 1761 501 deflated
BOX.SHR 966 219 deflated
C.SHR 426 242 deflated
LETTER.SHR 235 182 deflated
READ!.ME! 2104 914 deflated
SHORT.DOC 27971 9052 deflated
SHORT.EXE 63872 12830 deflated

Download File SHORT2.ZIP Here

Contents of the SHORT.DOC file


by TABS Software

Copyright (C) 02-28-90

Version 2.00

Table of Contents

1. INTRODUCTION...............................................1
1. About This Document.....................................1
2. What Is SHORT HAND......................................1
3. How SHORT HAND Can Help.................................2
4. Why This is Not a Macro Key Expander....................2
5. When Won't SHORT HAND Work .............................2
6. How SHORT HAND Expands Strings..........................2

2. HOW TO USE SHORT HAND......................................4
1. Defining a SHORT HAND String ...........................4
1. Comments.............................................4
2. Extended Keys........................................4
3. The Suppress Key.....................................5
2. Loading Files ..........................................6
3. Options Switches .......................................6
1. Changing The Hot Key ................................8
2. Changing The Way SHORT HAND Deletes Short Strings ...8
3. When Speed is a Problem..............................8

3. BRINGING SHORT HAND TO LIFE...............................10
1. The Hot Key ...........................................10
2. The Main Menu .........................................10
3. Listing Current Strings ...............................11
1. Deleting an Entry ..................................11
2. Editing an Entry....................................11
4. Defining a New String "On The Fly" ....................12
1. The Define Window Fields............................12
2. Log Files...........................................12
5. Getting Text from the Screen...........................13

4. INCLUDED SHR FILES........................................14

5. ERROR AND WARNING MESSAGES................................15
1. ERRORS.................................................15
2. WARNINGS...............................................16

***** SHORT HAND Expander *****
Page: 2


1. About This Document

There are several terms used throughout this document that
may need some clarifying. They are:

short string -- a short set of characters used as a token or
abbreviation to represent along string. (eg.
the short string "etc." is a token for the long
string "et cetera.")

long string -- the set of characters that a short string
is defined to expand to. In the above example "et
cetera" would be the long string.

SHORT HAND string -- the same as short string.

define file -- a file that contains a list of short
strings and corresponding long strings.


SHORT HAND is a memory resident utility designed to work
withyour text editor. It will take short strings and expand
them to defined long strings. SHORT HAND allows you to define
frequently used words or phrases to a series of text key
strokes. The main benefitis that with properly defined SHORT
HANDstrings you can enter your defined key strokes without
loosing the fluidity of your typing.

As an example the following defines were used while writing
this document.

The SHORT HAND strings:


were defined to expand to :

long string
short string

So every timethe word "ls" was typed the words "long
string" were inserted into the document by SHORT HAND.

***** SHORT HAND Expander *****
Page: 3

3. How SHORT HAND Can Help

The main purpose of SHORT HAND is to increasea typists
productivity. SHORT HAND reduces the amount of keystrokes neces-
sary to type long, cumbersome or frequently used words or
phrases. For example, the phrase:

Yours Sincerely,

could be shortened to:


The typist is saved 13 keystrokes. In addition SHORT HAND
assures you that your defined long string will always be spelled
correctly. Since "ys" will always expand to "Yours Sincerely,"
you don't have to worry about typo's or how to spell
"sincerely". For a programmer this can be a great help. No more
compiler/linker errors because you left the 'c' out of

4. Why This is Not a Macro Key Expander

SHORT HAND isnot a macro expander and there is a good
reason for this. The main problem with macro expanders is that
text editors use most available function, control, and alternate
keys. So the only unused keys require that you play Twister on
the keyboard (left thumb Alt, right thumb Shift,left index
finger F1).This does not lend itself to very fluid typing. For
thisreasonSHORT HAND relies on a series of ordinary text key
strokes to perform its expansions.

5. When Won't SHORT HAND Work

SHORT HAND should work with most well behaved editors.The
only time it won't work is when your editor completely takes
over the keyboard or when your editor is graphics based. Sorry
butthere is nothing SHORT HAND can do to interface tothe
editor in these cases.

6. How SHORT HAND Expands Strings

SHORT HAND watches what you're typing. Every time you
complete a word (with a space, TAB, ENTER, orpunctuation
character) SHORT HAND checks that word to see if it needs to be
expanded. If the wordmatches one of your defined short
strings, SHORT HAND first deletes the short string and then
"feeds" the corresponding long string to the editor. Because
SHORT HAND looks for full words, certain characters are impor-
tant. SHORT HAND views these characters as word delimiters.The
valid starting and ending punctuation characters are:

***** SHORT HAND Expander *****
Page: 4

space TAB ENTER < > ` " ' ( ) , . : ; { } [ ] ! ?

Sincethese characters have special meaning some specific
rules must be followed when using them inSHORT HAND string
definitions (see Defining a SHORT HAND String).

****IMPORTANT: When SHORT HAND feeds a long string to your
editor,it isas if you typed that string yourself. If
the editors insert mode is off SHORT HAND will overwrite
existing text. To prevent this keep your insert mode on
while using SHORT HAND.

***** SHORT HAND Expander *****
Page: 5


1. Defining a SHORT HAND String

SHORT HAND relies on user defined text files to set up its
string assignments. These files need to be created withthe
following form :


For example:

The short-hand-string can be up to 20 characters long. It
can contain any non-delimiting text or punctuation characters
(see How SHORT HAND Expands Strings). Any white space characters
(Tabs, spaces, and carriage returns) are Ignored. Allnon
white space characters before the "<" character are considered
to be partof the short string. The "<" character marks the
start of the long string.
Long strings can be upto 255 characters long.All
characters are valid inlong strings (including delimiting
characters). A long string is terminated with a '>'. This
character marks the end of the definition. Short Hand will con-
tinue to store SHORT HAND strings and their corresponding long
strings until the end of the file.


SHORT HAND allows you to comment your definitions. The in-
cluded file BOX.SHR uses comments heavily. Comments are begun by
the '\*' characters and continue to the end of the line. Any-
thing between this flag and the end of the line isignored by

2. Extended Keys

There are several special keys that can be inserted into
a long string. The beginning of a special or extended key is
marked withthe back slash key (\) and an x (for extended).
When SHORT HAND sees -- \x -- it knows an extended key name fol-
lows. Theextended key definition is ended with a back slash.
The correct form is \xKEYNAME\.

The following extended KEYNAMES are recognized :

-- NORMAL --

***** SHORT HAND Expander *****
Page: 6

F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, UP,DN,


#F1, #F2, #F3, #F4, #F5, #F6, #F7, #F8, #F9, #F10, #F11,
#F12, #TAB


^-, ^2, ^6, ^@, ^_, ^^, ^A-^Z, ^[, ^], ^{, ^}, ^\, ^|, ^F1,
^F2, ^F3, ^F4, ^F5, ^F6, ^F7, ^F8, ^F9,^F10, ^F11, ^F12,
^UP, ^DN, ^LT, ^RT, ^HOME, ^END, ^PGUP, ^PGDN, ^TAB, ^INS,


@!, @", @#, @$, @%, @&, @', @(, @), @*, @+, @,, @-, @., @/,
@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @:, @;, @<, @=, @>,
@?, @@, @A-@Z, @[, @\, @], @^, @_, @, @', @{, @|, @}, @~,
@F1, @F2, @F3, @F4, @F5, @F6, @F7, @F8, @F9, @F10, @F11,
@F12, @UP, @DN, @LT, @RT, @HOME, @END, @PGUP, @PGDN, @TAB,

**** NOTE: Key names are note case sensitive.

The following are some examples of extended key definitions:

asb < -- \\ -- a single back slash\xHOME\>
Title <\xTAB\The Title of My Book\x^O\\x^C\\xENTER\>

****NOTE: Any character that follows the '\' is inserted into
the string. So '\A' will insert an 'A' and '\\' will insert
a '\'.

3. The Suppress Key

In addition to the extended keys listed above, SHORT HAND
also includes the additional key definition of \xSUP\. This is
the suppress key (This is not a real key as it does not exist on
the keyboard. It is merely entered into a long string likethe
other extended keys). When SHORT HAND sees \xSUP\ it suppresses

***** SHORT HAND Expander *****
Page: 7

(ie.does not include) anything that follows it in the long
string. At first the usefulness of this may not seem clear.But
consider the following situation:

A programmer has several variables he is using in a project.

They are:
screen_left, screen_right, screen_top, and screen_bottom

To define a prefix for each of these variable names you can
use the following:

Now when the following is typed in:

SHORT HAND expands it to:

instead of:
screen_ left

The usefulness of this key will become clearer as youuse

2. Loading Files

The SHORT HAND program offers several options. The most
important is that it allows you to string together several files
of defines. In this way you can load a primary define file
followed by some secondary files. If you are a C programmeryou
may have a primary file that contains most of your basic C
commands. You may also have a define file for several of
the projects you are working on. These secondary filesmay
contain variable names for each project. So you could call up
SHORT HAND like this:

SHORT cdefines project1

This will load 'cdefines.shr' and 'project1.shr' defines
together. In this way you canuse the sameC function
definitions on several projects.

**** NOTE: .SHR is the assumed extension for SHORT HAND files.

**** NOTE: If a SHORT HAND define file doesnot exist inthe
currentworking directory SHORT HAND will search the en-
vironment path to try to find it.

3. Options Switches

***** SHORT HAND Expander *****
Page: 8

The following option switches are available with SHORT
HAND. These switches can be included on the command line when
you load SHORT HAND. They should be used before your define
file list.

/A -- will add the files that follow it to the files
already loaded in memory.

/R -- will replace previously loaded files with the ones

/U -- will unload SHORT HAND from memory.

****NOTE: If youhave already installed SHORT HAND in memory
you must specify one ofthe above options on subsequent
calls. The exception to this is the /S switch.

/H -- Will change the default hot key to a user defined
key. (See Changing The Hot Key)

/D -- Will change theway SHORT HAND erases SHORT HAND
strings.(See ChangingThe Way SHORT HAND Deletes
Short Strings)

/S -- Will change the speed at which SHORT HAND "feeds" keys
to your editor (see When Speed is a Problem).

**** NOTE: To see a list of valid command line options execute
SHORT HAND with no command line parameters.

***** SHORT HAND Expander *****
Page: 9

1. Changing The Hot Key

In some cases the default hot key of [Alt-S]may not be
convenient. So SHORT HAND provides a way of changing thehot
key on the command line. This is done by using the /H switch.
The format for using this switch is as follows:


KEYNAME can be any of the names listed under "Extended
Keys". For example:

/H^F1 sets the new hot key to CTRL-F1
/H^A sets the new hot key to CTRL-A
/H@A sets the new hot key to ALT-A
/H@PGUP sets the new hot key to ALT-PGUP

2. Changing The Way SHORT HAND Deletes Short Strings

When SHORT HAND expands a word it must first trick your
editor into erasing the short string. SHORT HAND does this by
sending your editor a number of Backspace characters equal
to the length of the SHORTHAND string.Since the Backspace
key deletes characters to the left of the cursor SHORT HAND can
use it to tricks your editorinto deletingthe short string.
This works fine with most editors; but some editors use the Back-
Space key as a cursor key, not as a delete key. These type of
editors use the Delete key to erase characters to the left of the
cursor. If your editor functions this way you must usethe
/D option for SHORT HAND to work properly. This option
tells SHORT HAND to erase SHORT HAND strings withthe Delete
key and not the Backspace key.

3. When Speed is a Problem

SHORT HAND tries to be as fast as possible, and sometimes it
can be a bit to fast. Editors have a lot to keep up with. They
may not be able to handle the speed at which SHORT HAND "feeds"
themcharacters. If your editor does not work properly with
SHORT HAND, first try using the /S option. This switch lets you
set SHORT HAND hand to speeds from 0 to 9 (0 is the default).

****NOTE: a speed of 1 or 2 is usually sufficient to fix most

This switch can be used in two ways. The first way is to
include it on the command line when SHORT HAND is first loaded.
This will set the speed of SHORT HAND as it is loaded.The
second way is used to reset the speed on a copy of SHORT HAND

***** SHORT HAND Expander *****
Page: 10

that is already loaded. When using the the second approachthe
/S switch must be the only thing on the command line. Valid uses
of the /S switch are:

short /S1 defines.shr
loads defines.shr and sets SHORT HAND to a speed of 1.

short /S9 /R document.shr
replaces the current defines in memory with
document.shr. Then it set SHORT HAND to speed of 9.

short /S0
resets the current memory resident copy ofSHORT HAND
to a speed of 0 (the default).

***** SHORT HAND Expander *****
Page: 11


1. The Hot Key

At any time you can press the defined hot key (the default
hot key is Alt-S) to activate SHORT HAND. This action will
suspend the program you are currently working onand awaken
SHORT HAND. The first menu you will see upon activation is
SHORT HAND's Main Menu.

2. The Main Menu

The Main Menu offers four options:

List current strings
Define a new string
Get text from screen
Exit Short Hand

You can choose an option by moving the highlighting to the
function you wish to use and pressing enter. To movethe
highlighting use the up/down cursor keys. Optionally,you
can also press the first letter of the option you wish to use.

***** SHORT HAND Expander *****
Page: 12

3. Listing Current Strings

This option displays an alphabetical list of all the SHORT
HAND string definitions you currently have loadedin memory.
The bottom two lines shows you which keys you can use with this

**** NOTE: To quick find a definition press the first letter of
the SHORT HAND string you wish to find.SHORT HAND
will move the highlight to the first string starting with
that letter.

1. Deleting an Entry

To delete an entry move the highlighting to the entryyou
wish to delete. Then hold down theCTRL key while pressing the
letter D.SHORT HAND will then display the message: "Delete
(Y/N)". If you wish to delete this entry press Y. If you want
to abandon the delete process then press N.

**** NOTE: The entry is only deleted from memory.This option
does not delete the entry from the define file it came from.

2. Editing an Entry

To edit an entry from the list hold down the CTRL key while
pressing the letter E. SHORT HAND will move the highlighted
entry from memory to the define window (see Defining a New String
"On The Fly"). You can then modify the entry and re-save it.

**** IMPORTANT: When an entry is edited it is removed from
memory.If you do not re-save it it will be lost.

***** SHORT HAND Expander *****
Page: 13

4. Defining a New String "On The Fly"

If you have been typing a phrase or word frequently,and
you wish to add it to your current listof defined short
strings, then use the "Define a new string" option. This option
gives you a way to add a new SHORT HAND string defini-
tionto memory without leaving your editor. A list of editing
keys appears at the bottom of the define window.

1. The Define Window Fields

The "Define" option screen has three fields. The first
field is labeled "Short". This is where you enter the new
short string. This field is limited to 20 characters (the maxi-
mum size of a short string).
The second field is labeled "Long" and is for the cor-
responding long string. This field is 400 characters long. Long
strings are still limited to 255 characters, the extra space is
to provide room for extended key definitions.
The final field is for the "Log File". This field is 128
characters long to allow room for path specifiers. The log file
is where all your quick defines will be stored.
At each field enter the text you wish to use.You should
enter your definitions just as you would when creating a define
file. The only difference is that the long string does not need
to be enclosed in angle brackets ( '<', '>' ). When you are com-
plete pressF1 tosave your define to memory and to the Log

**** NOTE: Since space characters are not allowed in short
stringsor file names, the space bar is disabled when you
are in the Short, and Log File fields.

2. Log Files

As youenter each new define your work is saved tothe
designated log file. You may change this file to anyDOS
compatible name you wish (you may also include a path). If the
fileexists then your defines are appended to the end. If the
file does not exist then it is created. At a later time you can
edit the log file and modify your quick defines.

***** SHORT HAND Expander *****
Page: 14

5. Getting Text from the Screen

This function allows you to "grab" text from the screen and
move it to the define window. When you choose thisoptionthe
following help screen appears:

Move Cursor to the Start of the Text You Wish To Mark.
Then Press Enter to Begin Marking From That Spot.
Move Cursor to the End of the Text You Wish To Mark.
Then Press Enter Again.
Press a Key to Begin. Press ESC to Abort.

This screen will stay on until you press a key.To move the
cursor use the /// keys. When the cursor is at the start of
the text you wish to mark press enter. When you press the enter
key the starting corner of the block to grab is marked. Then
move the cursor to the other corner of the text you wish to grab.

The highlighting will move to show you what text will be in-
cluded. When you press enter again the text under the highlight-
ing is moved to the define window (see Defining a New String"On
The Fly"). At any point you can press ESC and abandon this func-

****NOTE: SHORT HAND strips off all trailing spaces from the
marked text. It also appends a \xENTER\ to the end of each

***** SHORT HAND Expander *****
Page: 15


Four SHR files have been included with SHORT HAND. These
files are provided to give you some working examples of how to
create SHORT HAND defines. Two of these files(C.SHRand
ASM.SHR) are for use by programmers. BOX.SHR is for inserting
boxcharacters into your text without having to remember their
ASCII values. And, the final file LETTER.SHR contains some
defines for use in a letter.

NOTE: LETTER.SHR contains the following defines:

mt <\xBKSP\ment> and

Thesedefines demonstrates how SHORT HAND can also be
usedfor common suffixes and prefixes. Load LETTER.SHRand
then type: "base mt" and "hy active" watch what happens.

***** SHORT HAND Expander *****
Page: 16



/X is an illegal option.
An illegal option switch was used. Valid switches are:/H,
/D, /A, /R, /U.

Another resident program has been loaded on top of SHORT HAND.
Resident programs must be unloaded in a Last-In/First-Out
order.If you loaded another memory resident program after
you loaded SHORT HAND; it is necessary to unload that
program before the options of: /A, /R, or /U can be used.

Can't find DOS critical error flag unable to run SHORT HAND.
This is an internal error to SHORT HAND. Please report it
to TABS Software.

Duplicate SHORT HAND strings found > {short string}
You have defined the same short string twice.

Illegal character found in SHORT HAND string.
You cannot use any nonstandard ASCII characters in short
strings. Youalso may not use delimitingpunctuation
characters in short string definitions. See text for list
of delimiting characters.

Illegal characters used in hot key definition.
Usage: /H(KeyName) See manual for list of key names.
The /H switch was used incorrectly. See text.

Illegal File Name > ########.###
File name does not conform to DOS standards

Long strings cannot exceed 255 characters
Enough said.

No file names listed.
No file names were listed on the command line.

Only speeds of 0-9 are allowed.
The /S switch was used improperly. See text.

Option switches can only be used once.
You cannot specify a option more than once on the command

**** NOTE: You cannot use /A and /R on the same command line

SHORT HAND already installed please specify /A, /R or /U.

***** SHORT HAND Expander *****
Page: 17

Once SHORT HAND is loaded into memory, subsequent calls
must specify one of the above options.

SHORT HAND must be installed before PRINT.COM.
Because of the way SHORT HAND checks for resident copies of
itself; it is important that,in DOS versions below 3.00,
SHORT HAND is loaded before PRINT.COM

SHORT HAND strings cannot exceed 20 characters
Enough said.

String buffer full.
SHORT HAND reserves 30k of memory for definition strings
when first loaded. It reserves 2K of memory for quick
defines. This error indicates that one of these buffers is

The file : {filename} does not exist.
The file name specified was not found in the current
directory or any of the path directories.

The length of an expanded string must be greater than 0.
You can not define an empty short string. (ie <>).

This program requires DOS 2.00 or better.
SHORT HAND can not run on any DOS version below 2.00

Unexpected End Of File
The end of the file was reached before a long stringwas
terminated. ( ie. a missing '>' character ).

Unknown extended character name.
The name following the \x option was not in the list of
valid extended character names.


SHORT HAND expander not loaded.
/X Option ignored.
If SHORT HAND has not been loaded then the optionsof:
/A, /R, and /U are ignored.

 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>