A script to convert numbers which have the full stop instead of a comma as a separator.

Here is a script to convert numbers which have the full stop instead of a comma as the "thousands" separator.
I found the 2 RegEx lines in the AutoHotKey forum.


A more advanced script would find the numbers in the source segment and replace the ones in the target segment, automatically.
And also do the full conversion including the decimal point as well.
So any suggestions for that are welcome!


Example: 123.456.789 --> 123,456,789

------------------------

; first you select the number in the source language segment and copy it (to the clipboard), then select the number in the target segment
; then press F2 to run the macro

F2::
clipboard := RegExReplace(clipboard, "(\d),(\d)", "$1$2")
clipboard := RegExReplace(clipboard, "(\d)\.(\d)", "$1,$2")
Sleep 150 ; give a little time for this operation to finish
send ^v
Return

emoji