9.0
300
SetStateSample
SetStateSample.xml contains simple Text and Graphics commands that demonstrate how to use variables and
text formats and Advanced Scripting commands to set and unset a command state. This sample is designed to
work in DragonPad with the initial command "Sample Set State". When the command executes, a command
state is set for DragonPad and a simple exchange of greetings is simulated between the user and the system.
The user speaks the greeting, e.g. "Good Morning", and the system responds in bold red text. When the user
says "Good-bye", the exchange is terminated and the command state is unset.
SampleInjuryReport
SampleInjuryReport.xml together with SampleInjuryReport.dot demonstrates how structured commands and
Microsoft Word templates can be used together to create a voice-enabled form filling environment. The
template is a mock injury report with several text and checkbox fields can be filled using the commands included
in the XML file. You start a form filling session with the voice command "Edit Report" spoken in a new document
based on the sample template. Both the template and the commands are designed to work in Microsoft Word
2003.
Importing Structured Commands
You can import existing structured commands, such as the Structured Commands Samples, into Dragon
NaturallySpeaking to use as templates for your own commands. Use the following procedure to import the sample
structured commands that are supplied with Dragon NaturallySpeaking:
To import the sample structured commands:
1. On the DragonBar Tools menu, click Command Browser to open the Command Browser window.
2. Click the Manage button on the Command Browser toolbar.
3. In the Manage area, click the Import button, and in the Import Commands window choose MyCommands
XML files from the Files of type list.
4. Use the Import Commands window to browse to the Documents and Settings\All Users\Application
Data\Nuance\NaturallySpeaking9\Data\Enx\samplecommands directory.
5. Select one of the sample .XML files (for example, sampletgv_restaurant.xml) and click Open.
6. Click OK on the Import Commands validation dialog box and then click Import on the Import Commands
window to import the commands contained in the file.
Note: The syntax of XML command files is defined by a document type definition (DTD) file that resides on the
Nuance web site. When you import an XML command file, the application gives you the option of validating the
syntax of the XML file against the DTD. The validation step is useful if you receive a XML command file from
another person and want to check it for syntax errors prior to importing it.
Click OK on the success message and return to the Manage area of the Command Browser.
To examine the sample code
Open the Command Browser and click the Manage button.
Expand and select the appropriate item (for example, “<restaurant_type> Menu”)
Click the To Script button and then click the Edit button.
The My Commands Editor dialog box opens with the command you selected entered into it. You can examine and
modify the command with the My Commands Editor.










