Newbie here. Forgive me if this has already been discussed. I searched the BBS and the Scripting Additions section but couldn’t find what I’m looking for.
I have written several scripts that parse selected (clipboard) financial information and accumulate subtotals and grand totals. I wrote a subroutine to format passed results as dollars and cents using string operations. No problem, worked pretty well until I got to numbers greater than 10,000 plus change. As far as I can tell, AppleScript uses scientific notation when such real numbers are coerced into strings. I figured a way to decompose the parts of a real number using Div and Mod operators. Then I wondered if there wasn’t a Scripting Addition or hidden AS command to format numbers like HyperCard’s “number format” command. Is there such a beast?
Worked like a charm once I removed the code from a Finder tell statement, a mistake I frequently make. I also changed the format string to fill with trailng zeroes (“###,###.00”).