Transform text (script)

@Andreas_Hegenberg I would like a * to be added to the beginning and end of a highlighted word.

image

I assume this works with a script (via the clipboard, copy/paste) that BTT can run. But I have no idea how to do that. Can you please help me? Thank you very much!

You can use this transformer script:

async (clipboardContentString) => {
   return "*" + clipboardContentString + "*"
}

In theory you could also use the ChatGPT action for it :wink:

2 Likes

Or the good Lord. Works perfectly. Thank you very much :smile:

Quick additional question. This trigger should only work in a CAG if the following conditions are met.

image

How do I specify the "Subrole"?

Like this:

1 Like

Mm, if I'm not completely blind, I don't have a "focused_element_subrole" in the list.

mhh it looks like something got messed up there with the german translation. I recently allowed Xcode to migrate to the new modern format because I'm working on a full update for the German translation. Probably something got messed up there.

At least "Sub-Rolle des fokussierten Elements" should now be available in 4.344 again (uploading now)

Yes, thank you.