I think, in this particular case, I might actually suggest that it's easier to start with the dual-trigger macro—it's one less macro to manage. Maybe it's Computers 101.5 :).
(Aside: Mike and I have messaged and worked out our differences; we were both frustrated, he over the support he was getting and me over the information we never seemed to get from him. All is good now.)
The attached macro has two triggers, and will behave differently depending on what trigger is used. Generally speaking, @Nige_S is right: Typed string triggers are a TextExpander way of thinking, and those trigger types are most useful when typing text. For everything else, there's almost always a more convenient way to make it work.
And in this case in particular, it's hard to use a typed string trigger to copy the URL without doing a lot of extra work. So this macro copies a URL if you press Shift-Control-S, but pastes the URL when you type ;;paste
. Here's how it looks in action:
An animated GIF hides within
The URL won't change unless you use Shift-Control-S, you can then paste it everywhere with the typed string. However, you'll notice an issue in the animated GIF: It's not pasting a clickable link. This can be overcome, but to do so, we'll need to know what app you're pasting it into—is it a web browser, email app, something else?
Most apps—TextEdit does not seem to be one :)—should recognize the URL and magically make it clickable. But if it does not, we can probably work around it, if you let us know what app it is on the receiving end.
Here's the macro:
Download Macro(s): Save or paste a URL.kmmacros (21 KB)
Macro screenshot
Macro notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System information
- macOS 14.4.1
- Keyboard Maestro v11.0.2
There is some error checking in the macro: It makes sure there's a selection before you try to copy, and it makes sure that that selection is a URL, so you don't replace your URL with normal text. It also won't try to paste if the global variable is empty (and it will tell you that, so you can copy a URL).
Please let us know if you have questions on how this works.
-rob.