Ditto icon indicating copy to clipboard operation
Ditto copied to clipboard

Is it possible to process a paste before pasting?

Open imthenachoman opened this issue 3 years ago • 1 comments

For example, only paste the numbers or letters of what is in the copy buffer?

imthenachoman avatar Sep 01 '21 02:09 imthenachoman

This is resurrecting an old issue, but I can't get scripts to work reliably. There are docs: https://github.com/sabrogden/Ditto/wiki/Scripting which look fine unless one tries to use the hotkeys.

When I add my script on copy, the stored string looks ok, however Ctrl+V pastes the unchanged text. Only pasting from Ditto menu uses the modified text. On paste script doesn't work either. I use Alt+Ctrl+V for Ditto paste plain text feature, and it enters the old text without replacement, If there's a way to get around it, it would be helpful to add such info to the docs page.

What I've tried (removing Facebook tracking):

clip.AsciiTextReplaceRegex("(^https://.*)[?]__cft__.*$", "$1");
return false;

Windows 11, Ditto beta 03.24.231.00 64 bit; it was the same with the latest stable

marcinsmialek avatar Jul 25 '22 21:07 marcinsmialek