hoolagen1
USA
Asked
— Edited
help guys.
im trying to figure out how to activate a script by voice control....
i go to script, type in
servo(d19, 30) servo(d19, 50)
i hit repeat and name it shoot
then in voice command or personality generator i type
controlcommand(startscript, "shoot")
ezb tells me shoot is not a valid wondows command.....
what am i missing, cuz i know its me and not the software.
Do you have the scriptstart and "shoot" in the wrong order?
no, ive played around with the sequence and nothing...i tried moving the "" to scriptstart and nothing...
im literally following DJ Sures example letter by letter by letter and nothing. I think ControlCommand() is trying to do a windows function not a ezb software function....
not sure.
The manual is your friend - but long! It's on the right of every control that has a script interface. Look up the syntax for the control Window command, then look up the available commands for the window you are trying to control...
Hint: ControlCommand("shoot", scriptstart)
Also, if you select "repeat", it will run for ever and ever and ever and ever. So maybe you don't wanna do that? The repeat option should be removed, actually. Because to properly repeat a script, you'd use GOTO() and :LABEL statements...
Example:
gotcha, ill check it out again after work...the thing is i do reference the side commands....
and i swear it states scriptcommand(scripstart, "shoot")
i thought i tried shoot first then scriptstart, but i guess not...ill do it tonight.
thanks for the example....
thats was actually the next command i was going to start messing with the "if" commands.....
the :label and goto(), seem a little trickie, but ill mess with them for a while and come back with some better questions.
thanks again for the quick answers...
DJ sures,
I just did my first repeat script based on the code you gave above.
tell me if i am doing this right (im getting the result i want so, yeah)
what i want is for the 2 PIR sensors on the left and right side of the wall-e to:
always scan, if its triggered (value at 100) then i want the head to move up, once its not triggered (value at 0) i want the head to go down
i want this to "always be on" and i didn't want to hit the repeat button
so i wrote the following script...
:goUp adc_wait(adc, higher, 100) servo(d15, 50)
if(servo(d15) = 50) goto(godown)
goto(goUp)
:godown adc_wait(adc5, lower, 100) servo(d15, 70)
if(servo(d15) = 70) goto(goUp)
goto(godown)
right?