Aerius
Canada
Asked
— Edited
Is it possible to insert a "control command" in a $variable?
ex: $Female= ControlCommand("Speech Settings", SetVoiceGender, "Female")
for now the result faults with "Missing String Quotes or Invalid Expression:"
any idea?
I am not sure how you would execute it, but you would need to put the whole ControlCommand string in quotes for the variable to accept it.
I would instead make a $gender variable and use it in the control command, like this:
Alan
Tanks Alan,
The variable within the ControlCommand() is working.
I am looking to simplified the use of ControlCommand() to switch gender in a script where I establish a dialog between my PC and EZB
here's an example:
ControlCommand("Speech Settings", SetVoiceGender, "Female")
Saywait("who are you?")
ControlCommand("Speech Settings", SetVoiceGender, "Male")
SayEZBwait("I am EZB ")
I am wondering if it's be possible to switch gender within the "Say" command.
By the way it's fun and plenty of possibility to listen both unit chanting together.
I would do something like this, although could get even more elegant by having the phrases in text files and doing "FileReadLine" commands so the script is just a few subroutines.
note: untested --
As far as I know ControlCommand does not return a value (in this case anyway) so you can't assign it to a variable...
You'll have to do something like below...
Ricahrd,
Will your script work with that space inside the parentheses after the $g=WaitForSpeech( ?
Does EZ Script ignore spaces?
@Dave... yes Spacing can be good for readability....
@Alan Your code example is working fine and will simplify my script. Text file usage is also a great idea.
@ Richard Tanks for your suggestion
gilles