I have a problem with copying the highlighted text for this macro. It works half the time. Usually when I don't use it for a while and then call it, it pastes No Text in Clipboard instead of the word it was supposed to copy.
I have tried the Copy action, Copy to Named Clipboard and Cmd+C Keystroke.
I rely on the Copy action a lot but when it doesn't deliver the bacon, it's invariably because there the Copy option is not active in the Edit menu. So I wrap the Copy in a test (If Menu Condition Copy is Enabled sort of thing) to see what's going on.
You shouldn't need those Pauses or a named clipboard for this, either.
Hi, @Anaxis. I don't remember all of the circumstances, but I've had some occasional problems with the Copy action. If I'm reading the wiki properly, one should not need a Pause or Pause Until when using this action. (By default, the Timeout is set to 10 Seconds.)
With that said, I've always found this approach to be fast and robust.
Maybe I had a misbehaving application as well and the different behavior I saw with Type a Keystroke ⌘C vs Copy was coincidental.
For anyone following this thread...
When your macro changes the System Clipboard, you might want to consider restoring it at the end of your macro. You can use the following snippet and adjust the repeat times depending on the number of times the macro updated the clipboard (or exclude the repeat if it was only once).
I wonder if there's a way to auto-assess the number of clipboard changes that occur during a macro run and then use that to delete past clipboard seeds...?
Seems to me that one would need to be careful to avoid collisions of Named Clipboards if taking that approach. Since it appears that the Named Clipboard name cannot be changed dynamically, here's one possible approach.