Text-Related Actions

Keyboard Maestro can do quite a bit with text in your scripts.



Video Transcript:

DAVID SPARKS: In video 2.2, I explained how you can use text or keyboard actions to trigger Keyboard Maestro Macros. In this one, we're going to talk about the actions you can perform with text, which is a little bit different. But, if you need a refresher, I'd go back and watch 2.2 to start.

In this case, I've got a sample macro here called Text Related Actions, and it's got the trigger Control + Option Command + T. And what are we gonna do with that with text? Well, one of the best ways to explore actions in Keyboard Maestro is just hit the new Actions button, it slides up the screen. And whatever you're looking for, it will search if you just type it in, Text. And you can see it's searching the entire library, because I’ve-- I have all actions selected here. If I were just to go to application control, you'll see that there's nothing in there for Text. So, if you ever do a search, and it's got very few or no results, then you think it should. Make sure that you're in the right place. I always go to all actions, and that gives me everything there. And you can see there is a couple different things we can do here. Some of them are application specific, like apply a BBEdit Text Factory, or go to a Safari Field to add text. You've got some here that are specific to applications.

But, more interesting, I think for this kind of general overview, is what you can do with text in general. I already showed you in video 2.2. But, I'll put it here anyway, you can display text. And with-- I'm just going to type Sample Text here. And it's going to display briefly, it's going to put it as a notification in the upper right. So, I'll hit Control + Option Command + T. And there's a conflict, and this is what a Keyboard Maestro calls the conflicts panel. And what it means is, I've got two different scripts that have the exact same trigger. One of them is Text to Related-- Text Related Actions, the one we're working on right now. Another one is the Trigger a Macro by Name.

Now, I can select the one I want just by hitting the next appropriate letter, and they're greyed out here. So, it'd be E or R, but I want to use E, so I can use E. This is a warning to me. So, if I see this show up, I can go ahead and just pick the one I want and continue or I could also stop and go change the shortcut for one of them. So, that doesn't happen anymore.

I'm going to leave it here and just type E now. And then the Text Related Action came, and it put the notification in the upper right corner for Sample Text. We-- I showed in 2.2. But I'll do it once again, the large text is kind of cool. So, I'm going to hit, once again at the conflict window I hit E, and there's the Sample Text and Big Text. Just so we don't get that conflict panel anymore, I'm going to change it to the Hyper Key, the Caps Lock + 5, which I know is not gonna conflict anything.

And now I'm going to change it to display text in a window. Go ahead, and hit Caps Lock + 5. And there's the text in a window. So, there's a bunch of different ways to display information. Most of these are useful for you, for like alerts in the existing macros, or reporting back on a result, if it's doing some sort of computation for you.

Something, I didn't describe earlier is inserting text by pasting it or typing it. And you can do that right in this field like just click that, and it's going to paste the text, or it can type it just by selecting this option. They've also got these pulled out as separate actions. So, Insert Text by Typing, just drag in like that. And you can do the same thing. These can be useful. I actually like the Insert Text by Typing for anytime you go on the internet, and they won't let you paste. Like if you go on a bank website, often they give you a password field and then they need you to type it again. That's really hard if you've got a complex password. In fact, in the useful Keyboard Maestro scripts section later in this course, I have an actual segment, where I teach you how to create a Keyboard Maestro Script that does that for you by typing it in.

So, you've got a lot, you can do with text in Keyboard Maestro. You can also add it to the browser fields, and I've got some specific courses later dealing with the browser, and how we use these Keyboard Maestro scripts.

Under the text search, we get some clipboard stuff, I'm going to cover that separately. And we also had the Speak Text one which was fun. We tried that out in section 2.2, where you can have your Mac actually talk to you. So, there's a good overview of the various text actions available to you as you build out your macros with Keyboard Maestro.


Downloadable Keyboard Maestro Script:


Complete and Continue