Vocola.net
Vocola 3.1 Function Library
HearCommand(words)
Namespaces LibraryMain ► HearCommand
Executes a WSR command or Vocola command as if words were spoken.
Syntax
HearCommand(words)
Parameters
words
Words of command to be executed. May be a single argument with words separated by spaces, or multiple arguments each containing one or more words.
Remarks
Executes a Windows Speech Recognition (WSR) command or Vocola command as if you spoke the words specified by words.

If a Vocola command is recognized, this function waits for the command to be fully executed before returning. If on the other hand a WSR command is recognized, this function may return before the command has been fully executed; calls to Wait may be necessary in such cases.

Because of Vista security precautions, this function only works if Vocola is installed in the Program Files folder.

Examples
CopySpeech dictionary shortcut
Edit Words = HearCommand("Open Speech Dictionary");
This command allows saying "Edit Words" to invoke the WSR command "Open Speech Dictionary".
CopyOverride single-word WSR commands
<wsrWord> := ( delete | escape | start | home | end
             | scratch | undo | correct | copy | paste
             );
<wsrWord> = HearCommand("Insert $1");
WSR defines many single-word commands, which can be mistakenly invoked when dictating a single word. This command redefines some common WSR single-word commands to insert the word as dictation by invoking the WSR "Insert" command.

Assembly: VocolaFunctionLibrary (Module: VocolaFunctionLibrary) Version: 3.1.1.0 (3.1.1.0)