Hello Pfeil,
i need your help one more time.
So, i have a plane, Rotate MD80, i can't write directly the values like Airspeed, i must turn the knob.
So, i have do this code (the base is your original code), the problem is at the end, i can see the 2 Compares never start.
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Set decimal [XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED] value to the value of [ActualAirSpeed]
Set Text [AirSpeed] to ''
Set Boolean [DictationComplete] to False
Say, 'yes ?'
Start Loop While : [DictationComplete] Equals False
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Begin Text Compare : [{EXP:{TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"{TXTNUM:"{DICTATION}"}"}'
Else If Text Compare : [{DICTATION}] Equals 'zéro'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"0"}'
Else If Text Compare : [{DICTATION}] Equals 'un'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"1"}'
Else If Text Compare : [{DICTATION}] Equals 'deux'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"2"}'
Else If Text Compare : [{DICTATION}] Equals 'trois'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"3"}'
Else If Text Compare : [{DICTATION}] Equals 'quatre'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"4"}'
Else If Text Compare : [{DICTATION}] Equals 'cinq'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"5"}'
Else If Text Compare : [{DICTATION}] Equals 'six'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"6"}'
Else If Text Compare : [{DICTATION}] Equals 'sept'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"7"}'
Else If Text Compare : [{DICTATION}] Equals 'huit'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"8"}'
Else If Text Compare : [{DICTATION}] Equals 'neuf'
Set Text [AirSpeed] to '{TXTCONCAT:AirSpeed:"9"}'
Else
Play sound, 'C:\Windows\Media\Windows Ding.wav'
End Condition
Begin Text Compare : [{TXTLEN:AirSpeed}] Equals '3'
Set Boolean [DictationComplete] to True
Else If Text Compare : [{EXP:{TXTLEN:AirSpeed} > 3}] Equals '1'
Say, 'can you repeat please ?'
Set Text [AirSpeed] to ''
End Condition
End Loop
Set decimal [XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED] value to the converted value of {TXT:Airspeed}
Write ' WantedAirspeed {DEC:XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED}' to log
Write ' actual {DEC:xplane!Rotate/md80/autopilot/at_target_speed}' to log
Begin Decimal Compare : [xplane!Rotate/md80/autopilot/at_target_speed] Is Less Than [xplane!SIM/COCKPIT/AUTOPILOT/AIRSPEED]
Start Loop While : [XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED] Equals [xplane!Rotate/md80/autopilot/at_target_speed]
Pause 0.1 seconds
Set decimal [xplane!Rotate/md80/autopilot/speed_sel_knob] to [xplane!Rotate/md80/autopilot/speed_sel_knob] plus 1.00000
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Write ' +1' to log
End Loop
End Condition
Begin Decimal Compare : [xplane!Rotate/md80/autopilot/at_target_speed] Is Greater Than [XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED]
Start Loop While : [XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED] Equals [xplane!Rotate/md80/autopilot/at_target_speed]
Pause 0.1 seconds
Set decimal [xplane!Rotate/md80/autopilot/speed_sel_knob] to [xplane!Rotate/md80/autopilot/speed_sel_knob] minus 1.00000
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Execute external plugin, 'SPAD.neXt VoiceAttack Plugin - v0.9.5+' and wait for return
Write ' -1' to log
End Loop
End Condition
Say, 'airspeed is set {DEC:XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED}'
Write '[Purple] Airspeed {DEC:XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED}' to log
So, i think i forget just a little thing but i don't find.
Do you see where is my error ?
For information, before the first compare:
XPLANE!SIM/COCKPIT/AUTOPILOT/AIRSPEED is the wanted speed
xplane!Rotate/md80/autopilot/at_target_speed is the actual speed in the plane's autopilot.
Thank you very much.
Have a good day.