Keypad dialog is a good idea.
I also played with a "secure parser" that basically puts a blank space (" ") in an edit box, and then monitors if CtrlText ==" ". If not, then you check for "" (=delete), or " 0" - " 9" and "0 " - "9 "
if any of those, add the value, otherwise reset to " "
it works, but it's annoying to use (see UnifiedArtillery 1.1).
Sorry if you already found a solution yourself, but wouldn't it be possible to check if a number is a number by dividing by 1 and checking if it's still the same.
You enter 50.
A script runs, 50/1 == 50: pass
Now you enter 50oops
50oops/1 != 50oops: fail, as it isn't a number
Don't know if this check is of any use to you, but I thought that it could help, if only a tiny bit. But using a dialog looks and works good.
The problem with this approach is that OFP doesn't allow numeric entries. You can have a string with a value of "43.3", but to get the numeric value, you need to use CALL. At that point, you've executed any code in there. But if you want to go this route, and check to see if the CALL value is really a number, we wrote a little GetType function for CoC_NS that will return what type of value you have (string, array, number, boolean, object, group, array, or whatever)