Assuming outputvar is required, the following result was found.
use this function in various scripts. This adds the 1000th separator comma: FormatAddCommas(val) { Result:=val StringLen, OutputVar, Result NumLoop := (OutputVar // 3) DNum = 3 Loop, % (NumLoop+1) { StringRight,Digit,Result,%DNum% StringReplace, Result,...