Apologies, if this is very simple, I am new to this sort of software. I want any text I highlight to automatically be sent to my clipboard so I can easily paste it. However, I just can't make this work. I don't want to use a modifier but if I check allowing it to work without a modifier then my mouse doesn't work.
You can use the relatively new "Text Selection Did Change" trigger. As an action you could either just send cmd+c (to copy the selection), but a less intrusive way is to use this little Java Script:
async function addToClipboard() {
// the text selection did change trigger already makes the BTTTextSelection variable available, thus it's best to retrieve the text from that
let BTTTextSelection = await get_string_variable("BTTTextSelection");
await set_clipboard_content({content:BTTTextSelection, format: 'NSPasteboardTypeString'})
return true;
}
Here is a ready to use example:
auto-copy.bttpreset (1.8 KB)
1 Like