Larry Rosenthal's Master Macro NS5 Update

admin's picture
Program: 
Dragon NS

Larry Rosenthal wrote this for NaturallySpeaking Version 5. It's more of a test than anything to make sure all is working. This is also available in our downloads area.
---
Below are two "master macros" -- meaning they are macros that make macros. The advantages of using these master macros are that they are fast, accurate, they allow you to create a macro in any text editor, and they leave a copy of the new macro at the bottom of the open DragonPad document.

The drawbacks are that they will not work for any script macros containing
lists, and that these master macros put all macros they create into the
global vocabulary. Many folks think it's important to make macros
application-specific whenever possible, but I've added over 200 macros to
my global vocabulary and have found no problem with recognition or
response time.

To use a master macro, first create a macro using any word processor (if you use DragonPad it will save a few steps later on). The first line must contain the macro name and nothing else. The second line must begin with two stars. The last line must end with two stars. If you are creating more than one macro, there should be a space of one line between the end of one macro, and the beginning of the next. The first macro should be at the very top of a DragonPad document, which can be new or contain other text. If you have used another word processor such as Word to type out your new macros, paste them into DragonPad, and place them at the very top. When you are ready to invoke the master macros, be sure the cursor is at the top line of your DragonPad document.

Example: You are about to use the master macros to create two macros: the first is a keystrokes macro called Chimp Nirvana, to log quickly onto a fictional website you frequent; the second is a script macro called Assistant Fire to hide the Office Assistant that keeps popping up in Microsoft Word. The top of your DragonPad screen looks like this:

Chimp Nirvana
**{Tab 7}Banana{Enter}**

Assistant Fire
**Mousegrid 1, 9
Wait 150
ButtonClick 2, 1
Wait 150
SendKeys "h"**

When you say "Global Keystrokes", the new macro Chimp Nirvana will be highlighted and cut, moved to the bottom of the document, and also run through the Command Wizard, adding Chimp Nirvana to your NaturallySpeaking global vocabulary. Assistant Fire will now be at the top of your document, and saying "Global Script" will add Assistant Fire your NaturallySpeaking global vocabulary.

The master macros provided below work only with DNS Professional v5 (it may work with subsequent versions, just a the earlier editions of the master macros worked with NS Professional versions 2-4. )

Be sure that your global vocabulary doesn't already contain an old macro of the same name as the one you're trying to create-if so, delete the old macro, or change the name of your new one before running the master macro.

Do not use these master macros to make any macro containing two consecutive stars(**). The only double stars should be before and after the macro you are adding.

These master macros won't work if your new macros contain lists/arguments. If you don't know what these are then don't worry, your macros don't contain them.

If you have more than one file in your global vocabulary, the master macros will place your macros in the file that comes first alphabetically. If you are concerned about this, go to the New Command Wizard, start creating a new macro, and look at the file names listed in Step 3. If there are more than one, and if you want your new macros placed in a file other than the first, modify the master macros by finding the lines that read SendKeys "{Alt+g}{Alt+n}," and adding Wait 25 followed by as many {ExtDown} 's as needed.

Anytime you see the need for a macro, you can switch to DragonPad, write out the macro in text format, and add your new macro to NaturallySpeaking's global vocabulary, using one of the master macros, without bringing up any other programs or having to close out anything you are using. (As metioned, you can also first write the macro in any text editor, switch to DragonPad and paste.) It doesn't matter if there is already a document open in DragonPad, just create your new macro at the very top of the document. Once you run the master macro, your new macro text will be moved to the bottom of your document. When you get time, you'll need to cut this from the open document and paste it into whatever document houses your list of your macros.

To add the two master macros to your global vocabulary, use the New Command Wizard. Copy the two scripts from the bottom of these instructions, and paste them into the New Command Wizard script box (Step 7). Please note that while Global Keystrokes is used to make keystrokes macros, Global Keystrokes is itself a script macro. If the master macros don't work, reopen them, using the Command Wizard, and edit the long Sendkeys entries so that the entire material between the parentheses sits on one long line.

I've been using my old master macros with NS versions 2-4 for several years with no problem. The new master macros seem to work fine as well, but of course use at your own risk.

Cheers,
Larry

Global Keystrokes

SendKeys "{Ctrl+ExtHome}{ExtEnd}{Shift+ExtHome}{Ctrl+c}{ExtLeft}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "c"
Wait 25
SendKeys "{Enter}"
Wait 25
SendKeys "{Alt+g}{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Ctrl+v}{Alt+n}"
Wait 25
SendKeys "{Alt+t}{Alt+n}"
Wait 25
SendKeys "Dummy{Alt+n}"
Wait 25
SendKeys "{Enter}"
Wait 25
SendKeys" {ExtEnd}{ExtHome}{Shift+ExtDown}{Ctrl+x}{Ctrl+ExtEnd}{Enter 2}{Ctrl+v}{Ctrl+ExtHome}{ExtDel 2}{Ctrl+f}**{Enter}{Esc}{ExtDel}{Ctrl+Shift+ExtHome}{Ctrl+x}{Ctrl+ExtEnd}{Ctrl+v}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "ce"
Wait 25
SendKeys "{Alt+g}{alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+k}{Ctrl+v}{Alt+n}"
Wait 25
SendKeys "{Tab 4}{Enter}"
Wait 50
SendKeys "{Ctrl+ExtHome}{ExtDel 2}"


Global Scrpt


SendKeys "{Ctrl+ExtHome}{ExtEnd}{Shift+ExtHome}{Ctrl+c}{ExtLeft}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "c"
Wait 25
SendKeys "{Enter}"
Wait 25
SendKeys "{Alt+g}{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Ctrl+v}{Alt+n}"
Wait 25
SendKeys "{Alt+s}{Alt+n}"
Wait 25
SendKeys "MouseGrid 1,1{Alt+n}"
Wait 25
SendKeys "{Enter}"
Wait 25
SendKeys" {ExtEnd}{ExtHome}{Shift+ExtDown}{Ctrl+x}{Ctrl+ExtEnd}{Enter 2}{Ctrl+v}{Ctrl+ExtHome}{ExtDel 2}{Ctrl+f}**{Enter}{Esc}{ExtDel}{Ctrl+Shift+ExtHome}{Ctrl+x}{Ctrl+ExtEnd}{Ctrl+v}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "ce"
Wait 25
SendKeys "{Alt+g}{alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+n}"
Wait 25
SendKeys "{Alt+r}{Alt+s}{Ctrl+v}{Alt+n}"
Wait 25
SendKeys "{Tab 4}{Enter}"
Wait 50
SendKeys "{Ctrl+ExtHome}{ExtDel 2}"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Warning: the times in this

Warning: the times in this macro are still in milliseconds. In more recent versions of NaturallySpeaking they should be seconds.

So "Wait 25" should be changed into "Wait 0.025" etc.

Quintijn

admin's picture

It may be a good idea just

It may be a good idea just to remove the macro. I put it in just to see if all was working well.

Skip

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.




view recent posts