From the article:
When I first tried this, many years ago, I was half worried that it would trigger an infinite loop, where the simulated keystroke from the Keyboard Maestro macro would re-trigger the macro. I was wrong to worry — Keyboard Maestro is too clever for that.
It might just be worth a general reminder that the Wiki page for Type Keystroke action cautions that “You should not use this action to simulate a keystroke that is the same as an active Hot Key Trigger”. Even though KM is clever (that is to say that Peter is thorough!), I would opt for “best practice”.
I have not used MarsEdit in a long time and I do not currently have it installed, but I would fully expect KM's Paste action to work. As an undoubtedly unnecessary alternative to that, a Select or Show a Menu Item action would be able to select "Paste" if it exists as a menu item, which it surely would.
None of that is meant to detract from the article, and obviously ⌘-V calling ⌘-V worked out fine in the example. I just prefer to be cautious and go by the book (wiki), especially when alternative actions can be used just as easily.
I have found that there is a lot of scope for macros, triggered by ⌘-C and ⌘-V, that augment a copying or pasting process. Actions can be added to transform data after it is copied and before it is pasted, and of course by using macro groups, the behaviour can be different per application.
For example, in a macro group that is only active for Music.app, I have a macro, triggered by ⌘-C, that uses the Copy
action (obviously!) and then a Search and Replace
action that removes “Visit ” from “Visit http…”. I quite often need to copy the URL for a Bandcamp release, and Bandcamp thinks I need to be told to “Visit ” it. The macro means that I do not have to manually delete “Visit…” for the URL to work in a Web browser.
Another such action (with some just slightly more complicated regex) in the same macro transforms the contents of any copied track details, ready for pasting.