Registering and logging in removes this ad.
Registering and logging in removes this ad.
Text variable in Vocola script file?
Submitted by jojo on Wed, 06/11/2008 - 02:05.
Hi,
is it possible to have a text variable in a Vocola script file (*.vcl)?
I'd like to do something like the following (pseudocode):
$sound_directory$= "C:\Windows\Media\"
Test Sound = PlaySound("$sound_directory$Tada.wav");


Is this what you
Is this what you mean?
Capturing Dictation
Sometimes you want a command which recognizes any words you might say rather than recognizing a particular set of alternatives. For example, searching for text is a common operation in Microsoft Word. It would be nice to be able to speak a single command to search for the text you want rather than needing to speak a command to open the "Find" dialog box, pausing, and then speaking the text you want to search for.
You can use the special variable <_anything> in a command to match any spoken words:
Vocola: Find Text <_anything> = {Ctrl+f} $1 {Enter};
Say: Find Text will do Sent: {Ctrl+f}will do{Enter}
With this command you could search for the text "will do" by saying "Find Text will do", which opens the "Find" dialog box, enters the text "will do", and launches the search. (Note: if using this macro for Internet Explorer you need to call Wait after the {Ctrl+f})
Note that <_anything> matches anything you say, including saying nothing. So in the above example saying "Find Text" would bring up the "Find" dialog box to search for nothing. Since this may be unexpected it's a good idea to use at least two keywords in these commands (i.e. Find Text <_anything> instead of Find <_anything>) to reduce unwanted recognitions.
<_anything> may appear anywhere a regular variable term appears, and may even appear more than once in a command.
--------------------------------------------------------------------------------
This page (c) Copyright 2002-2008 by Rick Mohr.
Mark
Hi Mark, Actually I was
Hi Mark,
Actually I was asking a different question (see the other responses in this thread) but I'm always happy to be reminded about something useful.
Best regards,
Joe
You could use a user-defined function
Is your idea to define a constant and then use it in several other places? You could do that with a user-defined function, like this:
sound_directory() := C:\Windows\Media\;Test Sound = PlaySound(sound_directory() Tada.wav);
-Rick
Works great Rick, thanks
Works great Rick,
thanks very much.
Joe