The following command would be quite close to your current macro.
It is a little more restrictive then your macro in terms of where you need to position the cursor. You may want to replace the {Ctrl Shift Left} by {Ctrl Shift Left 2}.
Give it a try:
{Ctrl Shift Left}{Wrap}
{CopySelection}{Wrap}
{ReplaceAllClipboard}
findWhat = "."
replaceWith = "[period]"
{/ReplaceAllClipboard}{Wrap}
{ReplaceAllClipboard}
findWhat = ","
replaceWith = "[comma]"
{/ReplaceAllClipboard}{Wrap}
{ReplaceAllClipboard}
findWhat = "[period]"
replaceWith = ","
{/ReplaceAllClipboard}{Wrap}
{ReplaceAllClipboard}
findWhat = "[comma]"
replaceWith = "."
{/ReplaceAllClipboard}{Wrap}
{Paste}{Wrap}
{NoSpacing}