11.0

Table Of Contents
Chapter 11: Commands that perform actions based on the application state
Structured Command Samples
Dragon includes several sample
Text-and-Graphics
commands with variables and sample struc-
tured
Advanced Scripting
commands. You can import the samples into Dragon to use them as
templates for your own commands. The sample commands are fully commented.
Sample location
The sample commands are installed in (Windows XP):
\Documents and Settings\All Users\Application Data\N-
uance\NaturallySpeaking11\Data\Enx\samplecommands
See Dragon file structure for information on default locations on Windows Vista and other oper-
ating systems.
A shortcut to this directory is available on the Windows
Start
menu. To open this directory, click
Start
>
Programs
>
Dragon NaturallySpeaking 11.0
>
MyCommands Samples
.
Importing Sample Commands
You can import the samples into Dragon to use them as templates for your own commands. For
information, see Importing Sample Commands
Samples
The following samples are included with Dragon:
GroceryListSample_DragonPad
GroceryListSample_DragonPad.xml
contains
Advanced Scripting
commands that simulate
an on-line grocery order form in
DragonPad
. It demonstrates how to set and change command
states, activating and deactivating various state structured commands, and how to use the com-
mand prompt. The
"Prepare Grocery List"
voice command displays the first section of a
grocery list in
DragonPad
and sets a command state. Each section of the grocery list is designed
to have a separate state. The
"What's Available"
voice command prompts the user with a set of
grocery list commands that are active in the given section.
GroceryListSample_WordPad
GroceryListSample_WordPad.xml
contains
Advanced Scripting
commands similar to those
of
GroceryListSample_DragonPad.xml
. It demonstrates how to set and change command
states and to use the command prompt in WordPad and uses a different coding style. The
"Pre-
pare Grocery List"
voice command starts the grocery list in WordPad, activate the initial grocery
list state, and prompt the user with a set of grocery list commands that are active in the given
305