sabrogden / Ditto

Ditto is an extension to the Windows Clipboard. You copy something to the Clipboard and Ditto takes what you copied and stores it in a database to retrieve at a later time.
https://ditto-cp.sourceforge.io/
3.91k stars 206 forks source link

Scripting - Enable "On Paste Scripts" to modify the clip's metadata #718

Open liny01-nbsa opened 2 months ago

liny01-nbsa commented 2 months ago

I tried to implement a script to move any pasted clips to a particular group. So when I use the delete clips, I can simply delete all non-grouped clips as they aren't used in any pastes.

However, this below script has no effect if used as a On Paste Script, it works fine when used as a On Copy Scripts

clip.SetParentId(61672);
return false;

From my reading, the On Paste Scripts can decide whether to do the paste or change what's pasted, but not modifying the clip itself.

Is it possible to implement the such an use case in Ditto's scripting? Maybe with the explicit call to clip.save() or similar to allow clip modification.