So this is what I ended up doing. It works pretty well, actually. Above 90% accuracy in a quiet room.
Set small int (condition) [confquery] value as random from 1000 to 9999
Marker: restart
Say, 'Please confirm with code: {SMALL:confquery}' (and wait until it completes)
Pause 0.51 seconds
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Begin Text Compare : [{EXP:{DICTATION}={SMALL:confquery}}] Equals '1'
Say, '[Well done' or ' I'm so proud of you' or ' what an accomplishment' or ' amazing:] [commander' or ' sir' or ' ]' (and wait until it completes)
Set small int (condition) [bigredbutton] value to 1
Exit Command
Else If Text Compare : [{DICTATION}] Equals 'cancel'
Say, 'Confirmation cancelled' (and wait until it completes)
Set small int (condition) [bigredbutton] value to 0
Exit Command
Else
Say, 'Try again commander' (and wait until it completes)
Set small int (condition) [bigredbutton] value to 0
Jump to Marker: restart
End Condition
EDIT: The issue I'm having now (If you could call it an issue) is it says the number out completely, i.e. Five thousand two hundred and twenty nine. It's not a huge deal, but I was wondering if there was a way to get it to say each number individually without it being a big thing.
I'm essentially using it as a switch. Other commands call this one and depending on the outcome, the action is allowed to proceed.
Like this:
Say, 'On one condition' (and wait until it completes)
Execute command, 'Confirmation' (and wait until it completes)
Begin Small Integer Compare : [bigredbutton] Equals 0
Say, 'I'd rather not'
Else If Small Integer Compare : [bigredbutton] Equals 1
Say, 'Commencing backflip. Happy now?'
End Condition
edits upon edits: I apologize for my "pseudocode". I was at work and I remembered the syntax but not the commands.