I wonder if with KM is possibile to create a macro to auto copy to clipboard what you're writing in a specific app or situation.
Hi and welcome to the forum!
Can you be a bit more specific about what you're after? KM doesn't automatically record everything you type, no. However, if you describe the kind of problem you'd like to solve, perhaps I or someone else can help come up with a solution.
It's simple to explain, I would like to create some kind of autosave form old extension or typio for Safari
Not very surprisingly, you can set up a macro that copies your written text and then saves it somewhere. Similar to what you would do by manually. But this is not "auto copy", it needs a trigger.
Ah, what might work is to run the macro every x minutes automatically.
How would you do that? Select all, copy, right arrow
? That could cause a fair bit of unforseen disruption if triggered automatically.
@1Al if you were willing to switch to Chrome (or Brave), you could use this Typio extension.
True, unless you could verify where the cursor is before the macro starts automatically.
I use textarea cache on FF, but I'd rather Safari, so an extension or macro would be needed to fix this, writing a lot as I do, I miss it on Safari.
I'm a new user and I can't open a new topic today, so I hope I can write my second answer in this topic.
When I used macOS Mojave I used this macro with apple script, to auto close the boring message Disk Not Ejected Properly. It always worked fine. Now with Big Sur it doesn't do anything. What's the problem?
Now I solved with a recorded macro with click on absolute position, but in my opinion. that other is a more clean and elegant solution.
PS: I remember once there was a trigger combined between keys and click, now I can't find it.
Hey Guys,
There's a way to find the active text area using JavaScript, and of course you can then get the contents of that text area.
(() => {
const txtArea = document.activeElement;
const editorText = txtArea.value;
return editorText
})();
It would be advisable to add checks to make certain the active element IS a text-area, before saving its value, but that's an exercise left for the reader.
-Chris
How/when would you trigger it?
Use a periodic trigger.
The user would be required to enable/disable auto-save – perhaps with a timer or other criteria to turn it off. The timer interval could be user-settable.
Or – the user could simply assign a keyboard shortcut to manually save – using an easy to hit hotkey like F1 or ⌃S – or they could even commandeer ⌘S.
It's an imperfect solution, but we're talking about a text-area in a web browser here.
Ridiculous that there's not a good Safari extension for this...
That "boring" message comes up for a reason. Treat the cause, not the symptom.
There is a chrome extension by the name of auto copy
Automatically copy selected text to the clipboard. Has many configurable options for controlling the behavior.
When text is selected using the mouse it will automatically be copied to the clipboard.
Indeed it's ridiculous.