Hi, the attached macro will remove all whitespace characters from a highlighted string with auto copy/paste. Can someone help me modify it to also remove '+' and '-' from the string, for easily converting international phone numbers into just a numerical string? Thank you.
• Attachment [protected]: Remove all Whitespace Characters (with auto copy_paste).cfmacro [7,490 bytes]
Thank you! Could you actually change it to leave not just digits, but all alphanumeric characters? And to remove any punctuation, whitespace, line breaks, etc?
Hmm, I tried the macro. After importing, I opened the macro to edit it, and there is text in the 'Input' tab, but when I click 'Run Function', there is no output on the 'Output' tab. Is there output when you do this?
Despite this, when I assign the macro a hotkey, and try it on Notepad text, it does work. Should I not expect to see text on the 'Output' tab of the macro edit window? I'm running 6.0 beta 4. Thanks.
I've modified the macro above to keep letters as well as digits and attached the new version to this post. You can follow the steps above to get it to run in ClipboardFusion :)
Returning null on the Macro causes the output of the Macro to not show up in the output window, since setting it to null is essentially outputting nothing. To test it I commented out all of the copying/pasting functions, and returned the modified text variable after the Regex.Replace function is run. I didn't leave it this way for this final version though, because the paste function will set the Clipboard, then the Clipboard would be set again by the result of the Macro. This could slow the whole task down, as well as lock up the Clipboard for other programs.