Thank you for showing me how to capture a number through keypresses. I looked at Bunny's post in the Profile Upload section:
http://voiceattack.com/SMF/index.php?topic=51.0 and realised I could return to spoken numbers. I've adapted that technique to my profile requirements and thought I would share the results.
I have a Full Command which listens for spoken numbers between zero and 300 (the maximum size of the Materials store in Elite Dangerous Horizons). When a number in that range is spoken, the value is stored in a variable. For some reason, numbers zero to nine are not converted to digits, so I need the following action sequence:
(when I say, 'zero;one;two;three;four;five;six;seven;eight;nine;[10..300]')
Begin Text Compare : [{CMD}] Equals 'zero'
Set small int (condition) [EDSIQuantity] value to 0
Else If Text Compare : [{CMD}] Equals 'one'
Set small int (condition) [EDSIQuantity] value to 1
Else If Text Compare : [{CMD}] Equals 'two'
Set small int (condition) [EDSIQuantity] value to 2
.
.
.
Else If Text Compare : [{CMD}] Equals 'nine'
Set small int (condition) [EDSIQuantity] value to 9
Else
Set small int (condition) [EDSIQuantity] value to the converted value of {CMD}
End Condition
I can now use the following dialogue to capture the quantity of a given material, in this case Arsenic:
Set small int (condition) [EDSIQuantity] value to [Not Set]
Say, 'How many units of {TXT:EDSIElement} do you have in stock?' (and wait until it completes)
Start Loop While [EDSIQuantity] Has Not Been Set
Pause 4 seconds
Begin Small Integer Compare : [EDSIQuantity] Has Not Been Set
Say, 'I didn't get that. Please say again.' (and wait until it completes)
End Condition
End Loop
Set small int (condition) [EDSI_Arsenic_Qty] value to the value of [EDSIQuantity] (save value to profile)
Say, 'Quantity of {TXT:EDSIElement} set to {SMALL:EDSI_Arsenic_Qty}' (and wait until it completes)
In that 4 second pause I can speak a number. If what I say isn't recognised as a number, the dialogue loops until a value is found.