![]() Set this one to search for +$+ (without spaces before and after the string) and replace it with nothing. When the rule runs, it won’t trigger for the word our because there’s no space after, however, I need a way to reset it back to as it was.Īdd another Search and Replace action at the end of the macro. This action stops our from being caught by a later action Again, spaces before and after the string are important. This way it will only find the word when it’s a word on its own. ![]() I want to find every instance of the word our so enter our for Search. I know that my rule uses a space as the break so if I add another character, say a +, in front of the space it won’t trigger it.Įven better would be to use a string of random characters, say +$+, that is never likely to crop up in anything I write since only Keyboard Maestro is ever going to have to deal with it.Īdd another Search and Replace action before the one that searches for -our and set it to Case Sensitive. The problem with this rule is that if it encounters the word our it will replace it with or, so I need a way to fix that. There is a space following the suffixes and this is very important as that’s what we’re using to identify the end of the words. A Search and Replace action.įor the actual replacement, I'll search for our and replace it with or. Change String (Ignoring Case) to String (Case Sensitive). Ensure Search is set to System Clipboard. These will be the main building blocks of the macro. It doesn’t need to care what comes before the -our as long as it’s followed by a space.įrom the Variables group, add a Search and Replace action. Instead, I can use one rule that identifies the end of a word. Since it’s just the ending I’m interested in, I don’t have to worry about creating a separate rule for both colour and valour. Replacing every word ending in -our with the version ending in -or. This means that to use the macro you’ll need select the text then hit the trigger.Īdd a new Type a Keystroke action from the Text group. I’ll do this by copying it to the clipboard. The first thing is to get the text somewhere I can operate on it. I’m going to use a Hot Key trigger in this case Command-Option-Shift-C. Build a New MacroĬreate a new macro and call it something like British > American. With the techniques you’ll be able to build macros that process text in lots of interesting ways. This way I don’t have to research every obscure difference between British and American spellings to get it right first time.īy the time I’m done, you’ll have learnt some great tricks for manipulating text in Keyboard Maestro. I’ll build it in such a way that any time I find a weird edge case I can quickly fix it. I’ll also add some filters so it doesn’t change They’re to They’er and our to or. It’ll do this by searching through the block of text and replacing instances where a word ends with -our, -ise or -re and replace it with -or, -ize and -er respectively. They’re the centre of our world. and return, My favorite color is blue. So for example, it would take the string My favourite colour is blue. ![]() What I’ll build is a macro that takes a load of text written with British English spellings and converts it to American English spellings. Keyboard Maestro III: Situational Triggers.Keyboard Maestro II: Launching Apps Intelligently.Īlthough you will be able to follow along without doing so, it will also help your understanding if you’ve checked out my previous series on Keyboard Maestro: Working With Text in Keyboard Maestro: Part 1. ![]() Using Palettes to Improve Keyboard Shortcuts in Keyboard Maestro.Using Keyboard Maestro to Create Custom Keyboard Shortcuts.You’ll also need to have read the three previous tutorials in this series: It costs $36 for a license and there’s a 30-day free trial. You can grab one from the developers website. To follow this tutorial you’ll obviously need a copy of Keyboard Maestro. There will be a few edge cases where it makes a mistake, but with the techniques I show you, you’ll be able to fix them in your own version of the macro. What I’ll do is show you how to build a macro that takes a block of text written with British English spellings and convert it to American English spellings. In this tutorial I'll take things even further when it comes to working with text. In the previous three tutorials in this series I’ve looked at how to create keyboard shortcuts, how to use one shortcut for different macros and the basics of working with text. I can barely write a Hello World program in JavaScript, but I’ve automated huge parts of my workflow using Keyboard Maestro. Even if you can’t code, you can use it to create macros that automate the things you do. Keyboard Maestro is one of the most powerful Mac apps available.
0 Comments
Leave a Reply. |