Macros for Making Macros: Some Explanation and a Couple of Examples

To macros in the sections following this one make writing macros faster and easier. The Global and NatSpeak macros section macros are shortcuts to get you to certain places in the Macro Command Wizard. The NatSpeak: Command Wizard macros speed up input into the Command Wizard's various windows.

The NatSpeak Command Wizard consists of seven windows, and getting to the Command Wizard and through those seven windows requires about a dozen steps. This set of macros gets the steps down to the following five for a basic macro:

1. Tell NatSpeak where you want the macro to work from.
For example, say "Global Macro" to write a global macro, "Word Macro" to write a general word macro, or "Word Font Macro" to write a Word macro that works only in Word's Font window. See the Global and NatSpeak Macro making Macros section that follows for a more thorough explanation. This will take you to step 3 of 7 in the Command Wizard and activate the Caps-On command.

2. Name the Macro.
The words you say will automatically be capitalized. In general it's a good idea to start Macro commands with capital letters so you can tell the difference between plain words and macro commands.

3. Say "Text" or "Script" to choose the type of macro you want this to be.
Both commands will take you to step 6 of 7. If you want to write your macro in a bigger window then the six-line script window or the 10-line text window, you can say "Text Window" or "Script Window" instead to get to the WordPad Macrowin file.
(While Text macros consist solely of text and keystroke commands like Alt-F or Down Arrow, Script macros can include more complicated scripting commands like if-then statements and loops. The "Creating VoiceCommands" documentation that comes with NatSpeak Professional contains more comprehensive explanations and samples of scripting commands. The NatSpeak Macro Control:6 of 7 section that follows contains many macros that allow you to write both keystroke and scripting commands quickly by voice.)

4. Write the macro.
See the NatSpeak Creating Voice Commands manual for instructions on how to write both Text and Script macros. See the following NatSpeak: 6 of 7 section for macros that speed up macro writing. Note that the NatSpeak 6 of 7 macros also work in the WordPad Macrowin file.

5. Say "Please Finish."
If you are working in the WordPad Macrowin file you can say "Please Finish" to finish the macro or you can say "Copy all to NatSpeak" to stop at step 6 of 7. If your macro includes variables that require lists, the "Please Finish" command will take you to the first list. Alternatively, you can say "Next" to get to the first list window. When you are done writing the last list, you can say "Please Finish" to finish the macro.

Note
: When you use the Program Macro (but not Edit Program Macro or Global Macro) Macros, your choice of programs to write a macro for are limited to programs that are open or minimized. This is because NatSpeak chooses a program from a list of active programs it maintains. If the program you want to write a macro for is not open, it will not be on NatSpeak's active list, and the program macro that invokes the Macro will misfire. For example, if you want to write a Notepad macro and you say "Notepad Macro" without the Notepad program open or minimized, you will find your Notepad macro categorized under NatSpeak: Notepad, a nonexistent window, and the Macro will not work in Notepad.


Self-Guided Tour: Making the "Print Now" Macro.
Macro Range: WordPad
Macro Type: Text
Here are the exact steps to write a simple Text macro named "Print Now."
This macro allows you to say "Print Now" in the program WordPad to execute the commands Control P, which brings up the print controls, and Enter, which gives the go ahead to print. Without this macro, you have to say "Click File," "Print," "Click OK" to print something from WordPad.)

Say "WordPad Macro" to open to step 3 of 7 of the Application New Command Wizard.
Say "print now" to name the macro. What you say will automatically be capitalized, so it will be written as "Print Now."
Say "Text" to choose to write a Text macro and advance the Command Wizard to step 6 of 7, where you will write the actual macro.
Say "control p," "enter" This will be written in the 6 of 7 Window as "{Ctrl+p}{Enter}." Make sure to pause slightly between commands.
Say "Please Finish" to finish the macro and close the Macro Wizard.

To test the macro say "Print Now."
To look back at the step 6 of 7 Window of the macro you've just written, say "Last Application Macro."

 
Self-Guided Tour: Making the Macro "Informal Ending."
Macro Range: Global
Macro Type: Text
Here are the steps needed to write the Global macro Informal Ending:

Say "Global Macro"
Say "Informal Ending"
Say "Text"
Say "sincerely comma new line"
Say your first name
Say "Please Finish"

To test the macro say "Start Notepad," to bring up notepad, then say "Informal Ending."


 
Self-Guided Tour: Making the Macro "Formal Ending."
Macro Range: Global
Macro Type: Text
Here are the steps needed to write the Global macro Formal Ending:

Say "Global Macro"
Say "Formal Ending"
Say "Text"
Say "sincerely comma," "Enter," "Add 4," "your full name," You should see the following: Sincerely, {Enter 4} your full name. (This will tell NatSpeak to type Sincerely, then press enter four times, then type your full name.)
Say "Please Finish"

To test the macro, say "Start Notepad," to bring up notepad, then say "Formal Ending."


Self-Guided Tour: Making the Macro "Select 1-10 Words."
Macro Range: Global
Macro Type: Script
Here are the steps needed to write the Global macro Select 1-10 Words:

Say "Global Macro" to open to step 3 of 7 of the Global New Command Wizard.
Say "select," "one-to-ten," "words" to name the macro. Make sure to pause where there are commas. One-to-10 is itself a macro that returns <1to10>, a variable list for the numbers one through 10.
Say "Script" to choose to write a Script macro and advance the Command Wizard to step 6 of 7.
Say "Loop Sendkeys." This returns for lines of script and leaves the cursor between the quotes after the SendKeys command. These four lines will loop the command or commands you put between the quotes "x" number of times.
Say "control plus right." This will return {Ctrl+Right}. (The command Ctrl plus right arrow selects one word.)
Say "Please Finish."



Next Section: Global and NatSpeak Macros for Making Macros

Previous Section: Quicken

Back To Contents

 

[home] [writing] [about scriven] [rsi] [contact]

© Copyright 1999, 2000 Kimberly Patch. All rights reserved.
www.scriven.com