Here is a module called "SetTitle.dll".  This module allows you to change the title of the currently active window.  You may recall that the title of the currently active window is used by Dragon NaturallySpeaking to determine which list of commands is currently active.  If you change the title of the currently active window, for some application, then you can change the list of commands which Dragon NaturallySpeaking make active.

I'm providing this module for users of Dragon NaturallySpeaking to use at your own risk.  I have included both the executable code and the source code in the file SetTitle.zip.  The source code is also on line on the page Source code for SetTitle.

You can call SetTitle.dll using Dragon NaturallySpeaking scripting language command "DllCall".  As an example, the following macros demonstrate how use SetTitle.

First, copy SetTitle.dll to your Windows directory.  (You can actually use any directory, but I am using the Windows directory in this example.)

Now, create a macro called "Special Mode" which runs the following scripting line:

    DllCall "C:\Windows\SetTitle.dll", "SetTitle", "Special Mode"

The third argument is the new caption for the currently active window.  When you say the command "Special Mode", the caption of your currently active window (the Dragon NaturallySpeaking editor window in this example) will change to be "Special Mode".

Now, you can create a macro called "Test Macro" which is only active when the window caption is " Special Mode".  For example, here is a "Test Macro":

    SendKeys "See, it works."

Finally, create a macro called "Normal Mode" to restore things to the way they were before.  "Normal Mode" needs to run the following scripting command:

    DllCall "C:\Windows\SetTitle.dll", "SetTitle", " Dragon NaturallySpeaking"

To test this say "Test Macro".  You'll notice the text "test macro" is typed.  Now say "Special Mode".  This changes the caption of Dragon NaturallySpeaking.  Now say "Test Macro", and your new macro will execute.  Finally, say "Normal Mode" and the caption will change back to "Dragon NaturallySpeaking", and your usual set of commands will return.

(Yes, I know that this sequence will cause the current document name to be dropped from the caption until you save your file.  But this side effect will not cause any problems.)

Given this basic example, the clever developers among you should be able to significantly enhance the macro capabilities of Dragon NaturallySpeaking Deluxe Edition.

IMPORTANT: SetTitle is not a product from Dragon Systems or any other company.  There is no support for SetTitle.  Use this program at your own risk.  I am officially placing SetTitle in the public domain.  You may freely copy this program and use it as you would like. The program carries no warranties implied or otherwise.

Here are the sample macros in DVC file format:

MENU "NATSPEAK" {
   STATE "Dragon NaturallySpeaking" {
       COMMAND "Special Mode" {
           SCRIPT {
               DllCall "C:\Windows\SetTitle.dll", "SetTitle", "Special Mode"
           }
       }
   }
   STATE "Special Mode" {
       COMMAND "Test Macro" {
           SCRIPT {
               SendKeys "See, it works."
           }
       }
       COMMAND "Normal Mode" {
           SCRIPT {
               DllCall "C:\Windows\SetTitle.dll", "SetTitle", " Dragon NaturallySpeaking"
           }
       }
   }
}
Web page hosting graciously provided by
Synapse, a provider of speech recognition solutions.