They’re commonly used in most computer programming languages and they’re also available in Keyboard Maestro.įor more, check out our complete guide. If you’re not familiar with them, regular expressions are a way of matching and selecting information from strings. Now that I’ve got the link on the clipboard, it’s time to operate on it. Add two Type a Keystroke actions to make this happen. In most cases, this just takes two keyboard shortcuts Command-L to select the URL and Command-C to copy it to the clipboard. This means I need the macro to grab the URL from your browser. I want to be able to run the macro from any Amazon page. Building the MacroĬreate a new macro and call it something like Amazon Links. These same techniques will let you manipulate text in any other way you want. If you visit instead of a small percentage of the sale goes to a charity of your choice.Īs you can see, there’s actually quite a bit of manipulation that has to happen to get an Amazon link into the format I want. Obviously, I want to add this to any link I can.Īmazon also has the Smile program. This means that if I send you a link to Amazon and you buy the product, I get a small cutback. The rest of it is all bits to either make the link more readable to a human or provide Amazon with information.
KEYBOARD MAESTRO EXAMPLES CODE
The only bit that’s actually relevant is the code “dp/B071JNRK1V”. It obviously has the link to the product, but it also includes a lot of extra stuff like the search terms you used to find it.
KEYBOARD MAESTRO EXAMPLES TRIAL
It’s $36 from the developer’s website, although there is a free trial so you can work out whether it’s for you or not before you buy. To follow along with this tutorial you’ll need a copy of Keyboard Maestro running on a Mac. In this tutorial we’re going to do exactly look at that and consider how you can manipulate text inside Keyboard Maestro macros. Perhaps you need to strip some formatting or add a string beforehand. You won’t be able to just insert it as is. Sometimes however, you’ll want to do something more with the text.
In the second, it set the clipboard to a specific link. In the first lesson, the macro inserted a default goal. If you look back at the other tutorials, both examples I used involved some sort of text work. One of the most common things you’ll probably use the keyboard shortcuts you make with Keyboard Maestro for is to manipulate and insert text.
KEYBOARD MAESTRO EXAMPLES HOW TO
In the previous two tutorials, I've shown you how to create keyboard shortcuts with Keyboard Maestro and how to get the most out of them by using one shortcut for multiple different macros.