Not sure why your requirements have apparently changed, but I put together the following:
Dictate file nameSet small int (condition) [TextElements] value to 1
Marker: WaitForDictation
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Begin Text Compare : [{DICTATION}] Equals 'Stop'
Set Text [FileName] to ''
Set small int (condition) [Element] value to 1
Start Loop While : [Element] Does Not Equal [TextElements]
Write '[Purple] {TXT:Element{SMALL:Element}}' to log
Set Text [FileName] to '{TXTCONCAT:FileName:Element{SMALL:Element}}'
Set small int (condition) [Element] value as incremented by 1
End Loop
Write '[Purple] {TXT:FileName}' to log
Else
Begin Text Compare : [{DICTATION}] Starts With 'remove'
Begin Small Integer Compare : [TextElements] Does Not Equal 0
Set small int (condition) [TextElements] value as decremented by 1
Set Text [Element{SMALL:TextElements}] to [Not Set]
Jump to Marker: WaitForDictation
Else
Write '[Red] No text in buffer to remove' to log
End Condition
Else If Text Compare : [{EXP: {TXTNUM:"{DICTATION}"} >= 0}] Equals '1'
Set Text [Element{SMALL:TextElements}] to '{TXTNUM:"{DICTATION}"}'
Else If Text Compare : [{DICTATION}] Equals 'one'
Set Text [Element{SMALL:TextElements}] to '1'
Else If Text Compare : [{DICTATION}] Equals 'two'
Set Text [Element{SMALL:TextElements}] to '2'
Else If Text Compare : [{DICTATION}] Equals 'three'
Set Text [Element{SMALL:TextElements}] to '3'
Else If Text Compare : [{DICTATION}] Equals 'four'
Set Text [Element{SMALL:TextElements}] to '4'
Else If Text Compare : [{DICTATION}] Equals 'five'
Set Text [Element{SMALL:TextElements}] to '5'
Else If Text Compare : [{DICTATION}] Equals 'six'
Set Text [Element{SMALL:TextElements}] to '6'
Else If Text Compare : [{DICTATION}] Equals 'seven'
Set Text [Element{SMALL:TextElements}] to '7'
Else If Text Compare : [{DICTATION}] Equals 'eight'
Set Text [Element{SMALL:TextElements}] to '8'
Else If Text Compare : [{DICTATION}] Equals 'nine'
Set Text [Element{SMALL:TextElements}] to '9'
Else If Text Compare : [{DICTATION}] Equals 'zero'
Set Text [Element{SMALL:TextElements}] to '0'
Else
Set Text [Element{SMALL:TextElements}] to '{TXTSUBSTR:"{DICTATION}":0:1}'
End Condition
Set small int (condition) [TextElements] value as incremented by 1
Jump to Marker: WaitForDictation
End Condition
Usage example:
dictate file name
three
fortyfive
delta
oops
remove
stop
Will produce "345d".
Stop ends dictation and concatenates all elements to a string.
Remove clears the last character.
Numbers are always accepted as numbers if they're higher than 9, otherwise you'll have to clearly speak a single digit.
Any text that isn't 0-9 will have the first character added to the name(I.E. if you say "Delta" but the speech engine recognizes "dealt with", "d" will still be added).
You can change "Equals" to "Contains" for any of the lookup table elements, but the risk of false positives will increase as expected.
When I say "345d", VA rec. as "345 D". Is there a way to force VA to not put a space in between or cap the "D"?
To remove the space you can use the "{TXTREPLACEVAR:}" token:
{TXTREPLACEVAR:text:" ":""}
If you really need lowercase letters, you can run your text through the "{TXTLOWER:}" token:
{TXTLOWER:"{TXTREPLACEVAR:text:" ":""}"}
Or, if you're using dictation, use the "LOWERCASE" parameter:
{TXTREPLACEVAR:"{DICTATION:LOWERCASE}":" ":""}
However, Windows filesystems are generally not case-sensitive, so you may find uppercase works fine.