Reputation: 145
i am trying to create a macro for WSR where it takes the input of restarting system and confirms it by asking yes or no? Then if yes the macro restarts the system if no it just replies back canceling operation. So far this is what i have...
<speechMacros>
<command>
<listenFor>Restart the System</listenFor>
<speak>Confirm system restart. yes or no?</speak>
</command>
<command>
<listenFor>[...]chester</listenFor>
<if [...]="yes">
<run command="C:\Windows\System32\shutdown.exe" params="-r -t 00"/>
<else[...]="no">
<speak>canceling operation</speak>
</else>
</if>
</command>
</speechMacros>
i tried but it gives me the error saying...
A name was started with an invalid character.
Line:9 Col:5
<if[...]="yes">
How do i fix this?
Upvotes: 1
Views: 1935
Reputation: 11
If you use a <confirm></confirm>
block and put your prompt between the tags your user will receive a yes/no confirmation dialogue box which can be voice answered.
If yes is selected it should execute your command if no it should exit without executing it.
Upvotes: 1