Sad to say, I don't know of any built-in function that does this.
Do you use any other programming languages like C++ or Delphi?
You might consider doing it in that language and then bringing the formatted version back into AHK.
But I bet someone has already done this in AHK.
If I were you, I would spend a few minutes searching the AHK forums and then using Google to search the net.
Otherwise, the worst case scenario is that you convert the number to a string and then remove the minus sign temporarily if app.
Then loop from right to left in the string and place the commas into the string your self.
It's ugly but it's the last straw.
I bet someone has already done this though.
There are some examples in this thread:
[url]
http://www.autohotkey.com/forum/viewtop ... rs+strings
[/url]
Unfortunately, it's not exactly what you want.
Can you create the formatted string using an external EXE file and then store the result in a file and then use AHK to read the file to get the result? That might be possible if the number of conversions is not too large. Most languages have many facilities to do this quite easily.
For example, if you can use Delphi, it has many format functions such as,
Format function
FormatBuf function
FmtStr procedure
StrFmt function
StrLFmt function
I'm pretty sure that many C functions library have similar functions.