Your Top Ten Sentences; Alt+# Retrieves Them

Your Top Ten Sentences; Alt+# Retrieves Them

by Kendall Callas

"INCREASE YOUR MEMORY!" Have you seen the late-night TV hucksters touting ways to expand your intellectual powers? Well, I won't make you the hit of the party or promise to improve your professional success, but I can offer a practical and certain way to boost your WordPerfect productivity.

FAST FINGERS AND FEATS OF MEMORY

You know the joke, "It's deja vu all over again." That's how I feel sometimes when I realize that I'm typing a phrase that I've typed before. I'm sure your work includes a few favorites that you often type. "Very truly yours", "With reference to the above-captioned matter", "Thank you for calling to inquire about our ...", "Our address is ..." So, here's a small tool to save your fingers and avoid a few typos, a simple macro to make WordPerfect remember your top ten sentences.

VIABLE VARIABLES

If you've discovered macros, you've found a clever friend in the Alt+letter keys. They offer a quick and easy way to record keystrokes -- tasks or text -- for "replaying" with a single keystroke, Alt plus a letter. Once you get enthusiastic about macros, however, you quickly use up the 26 letter keys. After that you must give word-names to your macros, which require extra keystrokes to use.

For ten more Alt+key memory tools, number variables offer additional easy-to-use pieces of stored information. Number variables are retrieved with a simple keystroke. Like Alt+letter macros, number variables use Alt+number. That is, Alt plus a number key (1 through 9 and zero) from the top row of the keyboard (not the numeric keypad).

For example, hold down the Alt key and press the number 3. That will retrieve whatever text has been stored in variable 3. If the phrase "San Francisco, California 941" has been assigned to variable 3, then the Alt+3 keystroke will bring forth "San Francisco, CA 941" just as if you typed it.

The Alt+# keystrokes can be defined to hold various pieces of your frequently repeated text. Uses might include people's names, company names, phone numbers, your address, symbols, common phrases such as "Enclosed please find ", "Very truly yours", etc. Think about the typing you've done recently and create a set of variables best suited to your needs.

VARIABLE BASICS

A variable is used much like scratch paper; it's handy for temporarily remembering a piece of information, like a name, a dollar amount, or a phone number. But that points out the big drawback of variables: they don't last session to session. Variables are forgotten like a bad smell upon exiting WordPerfect. To counter the temporary nature of variables, set up a macro to define your variables. It's easy to set this up to run automatically each time you start WordPerfect. More on this later.

Like macros, variables may have word-names, such as Choice or AttyName. However, only the ten number variables can be used from the keyboard (via Alt+#); variables with word-names may only be retrieved with macro or merge programming.

One advantage of variables over macros is that you can use Alt+# variables in the middle of playing a macro. This is not true of a macro -- you can't run a macro while playing another macro. This means that Alt+# variables may be used to fill in the blanks as a macro leads you through creation of a document. This offers a powerful benefit that will speed typing while using a macro to step through fill-in-the-blank forms.

On the other hand, variables are more limited than macros. A maximum of 128 characters can be stored in each variable. They may contain text and keystroke names, such as {Tab}, {Up}, {Enter}, {Format}, {Print}. But no format codes are allowed in variables (such as bold, margin, or font settings).

DEFINING VARIABLES AS YOU TYPE

As you go about your typing, you can use the Macro Commands key/Ctrl+PgUp to define variables. At the "Variable:" prompt, type the number "5" (for example), then press the Enter key. At the "Value:" prompt, type in the text to be assigned to variable 5. You may assign only 79 characters to a variable this way. Now you can use the Alt+5 keystroke to retrieve that text.

A better approach to defining variables, though, is to first type the text, use the Block key/Alt+F4 to highlight it, then press Macro Commands/Ctrl+PgUp. This technique allows variables to hold up to 128 characters.

CREATING A PERMANENT SET OF VARIABLES

But what about that fatal flaw? If their contents evaporate when you exit WordPerfect, variables may be handy for spontaneous needs, but are they useful beyond a single session?

How can you create a permanent library of variables you can use every day? The answer is to use a macro or merge program to define a set of variables. The {ASSIGN} command can be used to define variables to hold up to 128 characters. The command in both the macro and merge programming languages of WordPerfect 5.1 looks like this:

{ASSIGN}variable~text~
{ASSIGN}3~Phrase number three.~

To make your variable assignments available every time you start WordPerfect, setup a macro to run at the beginning of each session. The macro (we'll call it STARTUP.WPM) defines the variables. To run this macro automatically each time you start WordPerfect, add the /M option to your startup command; instead of simply using "WP" to run WordPerfect, use: WP /M-STARTUP
Alternatively, add this line to your AUTOEXEC.BAT file:
SET WP=/M-STARTUP

YOUR MACRO -- SHOULD YOU DECIDE TO ACCEPT IT

The macro below defines the ten number variables. You can record this macro, but it's probably easier to use the Macro Editor/Ctrl+F10 to type it. Pick the {ASSIGN} codes from the Ctrl+PgUp Macro Commands menu and type the rest. (Watch those tildes!)

STARTUP.WPM This basic macro defines a set of ten Alt+# variables:

{ASSIGN}1~Phrase one~
{ASSIGN}2~Phrase two~
{ASSIGN}3~Phrase three~
{ASSIGN}4~Phrase four~
{ASSIGN}5~Phrase five~
{ASSIGN}6~Phrase six~
{ASSIGN}7~Phrase seven~
{ASSIGN}8~Phrase eight~
{ASSIGN}9~Phrase nine~
{ASSIGN}0~Phrase zero~

A law office might use the structure of the macro shown above to hold ten often-typed phrases:

{ASSIGN}1~San Francisco Superior Court Action Number ~
{ASSIGN}2~With reference to the above-captioned matter, ~
{ASSIGN}3~Cal. Civ. Proc. Code §~
{ASSIGN}4~Interrogatory Number :{Enter}{Left}{Left}~
{ASSIGN}5~Attorney for Defendants, Cross-Defendants and Cross-Complainants~
{ASSIGN}6~I have personal knowledge of the facts set forth herein and if called upon to testify, could competently do so.~
{ASSIGN}7~I declare under penalty of perjury under the laws of the State of California that the foregoing is true and correct.~
{ASSIGN}8~My office is located on Sutter Street between Van Ness and Franklin. Parking is available across the street.~
{ASSIGN}9~After our prearbitration meeting on XX, 1995, we will travel together to the arbitration. I look forward to meeting you.~
{ASSIGN}0~{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}
Very truly yours,{Enter}
{Enter}
{Enter}
{Enter}
{Enter}
{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}
William F. Johnson, Esq.{Enter}~

SWITCHING VARIABLE SETS AS YOU MOVE FROM TASK TO TASK

Perhaps the greatest value variables offer is not from a permanent set of them, but from the ability to switch between sets of variables tailored to specific tasks. By creating a set of macros, each to load ten variables customized to the needs of a specific typing task, you can fine-tune WordPerfect's tools to help with your work, minute-by-minute.

Create a set of macros to assign variables for each division of your work or category of your typing. A law office, for instance, might have 3 macros, PLEAD, LETTER, and MEMO, each defining different contents for the Alt+# variables to use in pleadings, letters, and memos:

PLEAD.WPM: a set of case names, pleading titles, court names, phrases, etc.;
LETTER.WPM: a set of addressees, subject lines, closings, paragraphs, phrases, etc.;
MEMO.WPM: a set of "To:" names, "Re:" lines, "cc:" names, phrases, etc.

Of course, this is a simple example. A law office would probably want to get even more specific, with sets of variables for different types of pleadings, letters, agreements, memos, invoices, forms, and other documents.

VARIABLES SET FOR EACH CLIENT

Another potent approach to tailoring variables is to use a different macro for each of your projects, clients, or cases. One approach is to load a standardized set of variables for each of your work categories. The CPA office, for example, might have macros to set the Alt+# variables for each client: SMITH.WPM, JONES.WPM, DAVIS.WPM, etc.

If your work is already well-organized into directories, store in each directory a "profile" of the client, case, or project stored there. The profile is stored in a macro, placed in each project directory, which defines a set of local variables. After that, your normal procedure would be to switch to a directory (changing your default directory as you go), then run the macro from that directory to load a set of Alt+# variables pertinent to the documents there.

A law office, for example, might have a CASEDATA macro in each case directory to define variables such as case name, matter number, responsible attorney, client name and address, court name, opposing counsel, etc., for each of their trial cases. A CPA might have a macro called PROFILE in each client directory to define contact name and mailing address, Social Security number, phone number, account number, special instructions, etc., for each of her tax preparation clients.

To use this "distributed" approach, give the macros a standard name like CLIENT.WPM or CASE.WPM, and make sure you don't have a macro with that name in your WP.EXE program directory, or in your central macro directory. After you create each macro, you will need to copy it to the appropriate document directory.

It's easy to create a powerful tool customized to your work by designing a simple macro or set of macros to define your variables. Below is another example of the simple macro needed. Use it as your STARTUP macro to define the Alt+# variables with handy phrases, or use it to pattern several macros to switch between task-oriented phrases, or to place a macro in each of your document directories to load variables with standardized information.

To complete the law office example, below is a macro called CASE.WPM. A copy of this macro (each with different names and details) is placed in each court case directory. The following table shows the pieces of information it assigns to the Alt+# variables:

Alt+1: Action #
Alt+2: Case name
Alt+3: Responsible attorney
Alt+4: Client name
Alt+5: Client phone #
Alt+6: Defendant
Alt+7: Opposing counsel
Alt+8: Court name
Alt+9: County
Alt+0: Judge

Here is the CASE.WPM macro:

{ASSIGN}1~C 94-01234~
{ASSIGN}2~Thomson v. Johnson~
{ASSIGN}3~John Rogers, Esq.~
{ASSIGN}4~Ellen Thomson~
{ASSIGN}5~(415) 123-4567~
{ASSIGN}6~George Johnson~
{ASSIGN}7~Fred Jones, Esq.~
{ASSIGN}8~Superior Court for the County of Contra Costa~
{ASSIGN}9~Contra Costa~
{ASSIGN}0~Hon. William A. O'Reilly~

IF YOU'VE GOT 'EM, FLAUNT 'EM

Instead of printing a cheatsheet to remind you of the variables the macro assigns, it's easy to enhance the macro to display a visual reminder. Add this additional feature by using the Macro Editor to type the following code, adding it to the very bottom of the macro:

{CHAR}x~Variables assigned:{Enter}
{Enter}
Alt+1 = {VAR 1}{Enter}
Alt+2 = {VAR 2}{Enter}
Alt+3 = {VAR 3}{Enter}
Alt+4 = {VAR 4}{Enter}
Alt+5 = {VAR 5}{Enter}
Alt+6 = {VAR 6}{Enter}
Alt+7 = {VAR 7}{Enter}
Alt+8 = {VAR 8}{Enter}
Alt+9 = {VAR 9}{Enter}
Alt+0 = {VAR 0}{Enter}
{Enter}
{Enter}
{Enter}
Use the STARTUP macro to set and display variables
{Enter}
[Press a key]~

USING VARIABLES IN 6.0

Version 6.0, of course, changed a few things about the way macros and variables work. Variable size improved; each one may hold up to 254 characters (more if you compound them, such as VAR3=Part1+Part2).

Unfortunately, assigning keystrokes to variables is no longer supported. In this case that means you can do it, but it's a pain. Instead of recording keystroke names, you must now use a function: NtoC(number), which stands for Number To Character conversion. For example to add an Enter key use the function NtoC(-8182). Here are a few handy NTOC values (for more, see the macros manual, Programming Commands, Appendix A: Keystroke Numeric Equivalents):

Enter = NtoC(-8182)
Tab = NtoC(-8183)
Left arrow = NtoC(-8167)
Right arrow = NtoC(-8168)

There is one requirement when using NtoC values to include keystrokes in your variable assignments: the assign statement must begin with an NtoC value. So VAR4 below, the "Interrogatory Number" statement, begins with a harmless NtoC(-8185), which does nothing but make WordPerfect recognize the NtoC functions later in the line (which represent Enter, left arrow, left arrow).

Here is the version 6.0 equivalent of the initial law office phrases example given above:

ASSIGN(VAR1; "San Francisco Superior Court Action Number " )
ASSIGN(VAR2; "With reference to the above-captioned matter, " )
ASSIGN(VAR3; "Cal. Civ. Proc. Code §" )
ASSIGN(VAR4; NtoC(-8185)+ "Interrogatory Number :" +NtoC(-8182) +NtoC(-8167) +NtoC(-8167) )
ASSIGN(VAR5; "Attorney for Defendants, Cross-Defendants and Cross-Complainants" )
ASSIGN(VAR6; "I have personal knowledge of the facts set forth herein and if called upon to testify, could competently do so." )
ASSIGN(VAR7; "I declare under penalty of perjury under the laws of the State of California that the foregoing is true and correct." )
ASSIGN(VAR8; "My office is located on Sutter Street between Van Ness and Franklin. Parking is available across the street." )
ASSIGN(VAR9; "After our prearbitration meeting on XX, 1995, we will travel together to the arbitration. I look forward to meeting you." )
ASSIGN(VAR0; NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +
"Very truly yours," +NtoC(-8182)
+NtoC(-8182)
+NtoC(-8182)
+NtoC(-8182)
+NtoC(-8182)
+NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +NtoC(-8183) +
"William F. Johnson, Esq." +NtoC(-8182) )

DISPLAY(OFF!)
SHOWCODE(ClrScreen!)
SHOWPOSITION(0; 1)
SHOWTEXT("Variables assigned:")
SHOWCODE(PosNextLine!; PosNextLine!)
SHOWTEXT("Alt+1 = " + VAR1)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+2 = " + VAR2)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+3 = " + VAR3)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+4 = " + VAR4)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+5 = " + VAR5)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+6 = " + VAR6)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+7 = " + VAR7)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+8 = " + VAR8)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+9 = " + VAR9)
SHOWCODE(PosNextLine!)
SHOWTEXT("Alt+0 = " + VAR0)
SHOWCODE(PosNextLine!; PosNextLine!)
SHOWTEXT("Use the STARTUP macro to set and display variables")
SHOWCODE(PosNextLine!)
SHOWTEXT("[Press a key]")
CHAR(x)

Copyright (C) 1995 by microCounsel, (415) 921-6850. All rights reserved.


[ Home Page | Articles List | Top of this article ]