num = effect("Slider Control")("Slider").value.toFixed(2).toString().replace(".", ",");
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
addCommas(num);
Formats a Slider Control value to two decimal places and adds thousands separators using periods.
Neatly formats large financial figures (e.g., "1.500.000") from a slider for on-screen display.