#1151·Ditto

Feature Request: Allow Ditto scripts to call an external process and return the result

Author: sampotter123Created Sep 17, 2026Updated Sep 17, 2026

I would like to suggest extending Ditto's scripting interface so that a script can send the current clip to an external program or script and receive the processed result back into Ditto.

The basic idea is:

Ditto clip → external process → returned result → Ditto clip

Example use case

One thing that made me think of this was Base64 text.

If I copy something like:

SGVsbG8gV29ybGQh

I would like to be able to have an On Copy or On Paste script detect that it looks like Base64, call an external tool such as PowerShell, decode it, and return:

Hello World!

Today I would normally have to open another tool or website, paste the value, decode it, and copy the result again.

Base64 is only an example. The main benefit is that Ditto would not need to implement Base64 decoding, JSON processing, URL decoding, image processing, or other transformations itself.

The external program could be anything the user wants: PowerShell, Python, AutoHotkey, jq, a custom EXE, etc.

Why the existing scripting interface seems like a good place for this

Ditto's existing On Copy / On Paste scripting can already decide whether a clip should be processed based on things such as clipboard format, source application, regex matches, etc.

That means the Ditto script could do the inexpensive filtering first and only launch the external process when needed.

Conceptually:

if clip matches condition:
    result = CallExternalProcess(command, clip data)

    if processing succeeded:
        replace/update clip with result

The exact API and implementation are of course up to Ditto.

Ideally this could work with Ditto's native clipboard formats rather than being limited forever to plain text. For example, an image clip could potentially be passed to an external image-processing utility and the processed image returned to Ditto. But even starting with text input/output would already make this very useful.

Related to #1057

#1057 proposes allowing ChaiScript to launch an external program using ShellExecute.

That gives:

Ditto → external program

What I am suggesting is extending that idea so that the external process can also return processed data:

Ditto → external program → Ditto

For text, stdin/stdout may be one possible way to implement it, although the implementation is entirely up to the developer.

I am not suggesting that Ditto become a larger scripting or automation platform. The idea is simply to give Ditto's existing scripting system a generic bridge to external tools, so users can perform whatever processing they need outside Ditto and return the result to the clip.