I wrote the following voice command in Dragon NaturallySpeaking's advanced scripting:
Sub Main
SendKeys"number_of_"
Wait(0.2)
HeardWord "no", "space"
End Sub
The point of the command is to type number_of_
, then prevent Dragon from adding a space when the user dictate another word. As a result, I used HeardWord
to call the no space
voice command.
Everything works as expected except the line HeardWord "no", "space"
, which fails to call the no space
voice command. Why?
When using HeardWord
, you need to write the exact name of the command, and not some homonym. In this example, the exact name of the command is No-Space
, and subsequently you should write:
Sub Main
SendKeys"number_of_"
Wait(0.2)
HeardWord "No-Space"
End Sub