Vocola.net
Vocola 3.1 Function Library
Replace(newText)
Namespaces LibraryDictation ► Replace
Replaces the just-dictated phrase with specified text.
Syntax
Replace(newText)
Parameters
newText
Text to replace the just-dictated phrase.
Remarks
This function replaces the just-dictated phrase by first sending enough "backspace" keystrokes to remove it, and then sending the keystrokes specified by newText. It will not work correctly if the insertion point has moved from the end of the just-dictated phrase.

If newText is empty, this function removes the just-dictated phrase from the dictation stack, leaving the previously-dictated phrase (if any) on top.

If the Vocola dictation stack is empty, this function does nothing.

Examples
CopyCapitalize the just-dictated phrase
Cap That = If( Dictation.CanGet(),
               Dictation.Replace(String.Capitalize(Dictation.Get())),
               HearCommand("Capitalize That") );
This command allows capitalizing both Vocola dictation and WSR dictation. If CanGet reports that Vocola dictation is available we capitalize the just-dictated Vocola phrase; otherwise, we attempt to capitalize the just-dictated WSR phrase using HearCommand.

Three Vocola library functions are used to capitalize the just-dictated Vocola phrase: Get retrieves the just-dictated phrase, Capitalize capitalizes it, and Replace replaces it.

This is one of Vocola's built-in commands.

CopyRemove the just-dictated phrase
Scratch That = Dictation.Replace("");
Saying "Scratch That" removes the just-dictated phrase. Subsequent dictation-modification commands will affect the previously-dictated phrase.

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