Title

Message

Confirm

<< DiscussionsReply

How to make macro or trigger to replace list of terms?

Frank99's profile on WallpaperFusion.com
Hi, I often copy text from OCR'd pdfs that have extra spaces in the middle of words copy/pasted from them, and those need to be removed if I want to use copy/pasted quotes. So the pdf appears to say "different" but when I copy and paste the word it pastes as "diff erent" because the double f's often get an extra space. Perhaps it is a font issue.
My idea for fixing the problem was to make a list of normal and regex terms that will be replaced when I hit a hotkey. I would select text, hit the hotkey, the macro would copy the text to the clipboard, run the replacements, and paste the result over the selected text. The replacement terms would be items like:
Original: diff<space>er (or in regex, diff\ er)
Replace: differ
I'm not sure if I need an "exceptions" list, but I would like the option for one, in case my regex skills are lacking.
Can someone help me with this macro or suggest another solution for the original problem? Thanks.
Oct 21, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Frank,

Using a "Text Replace" action in your default copy trigger should be able to do this for you. You can find that in the ClipboardFusion Settings > Triggers tab.

Hope that helps!
Oct 25, 2021  • #2
Frank99's profile on WallpaperFusion.com
Thanks! A problem with that method is that "Text Replace" seems to allow only one pair per trigger, but I want to make a list of many pairs of find/replace that I can run all at once with a single action. Is there a way to group a bunch of "Text Replace" actions together into one action or trigger them all with one hotkey? I will need at least 20 find/replace pairs.
Oct 26, 2021  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Frank,

Rather then adding a single text replace, you can create a trigger, and list all of your text replace's in the action pane. You can do this inside your default scrub trigger if you would like.

Thanks!
Oct 27, 2021  • #4
Was this helpful?    
<< DiscussionsReply