Hi, this is Gary with MacMost.com. Today let me show you how to create a
shortcut in macOS Monterey to capture text from anywhere on your screen.
MacMost is brought to you thanks to a great group of more than 1000 supporters.
Go to MacMost.com/patreon. There you can read more about the Patreon Campaign.
Join us and get exclusive content and course discounts.
So here's a very simple shortcut that you can create in the Shortcuts App that will allow you
to capture any portion of the screen. Whatever text is there, even if it's part of an image
or in some app where you can't copy text, that text will then be copied to the Clipboard.
So I'm in the Shortcuts App here in macOS Monterey. I'm going to click on the Plus button to
create a new shortcut. I'm going to start off here by doing a screen capture. So let's just search
for Capture here and there's Take Screenshot. I'm going to double click to add that. Then where it
says take full screenshot I want to change that to Take Interactive Screenshot. This will allow
me to select an area on the screen instead of capturing the entire screen. First I have to go
into Show More and change from Window to Custom. So now this lets me select an area. So if I
actually try this out by using the Play button here you could see it gives me the crosshairs
and I can select something. Then you can see it captures that and puts that in an image.
Now let's search for a way to get the text from the image. So we can see here if we just search
for text we can find one here that is Extract Text From Image. So we double click on that to add that
next. It will automatically link the results of the first action to
the second action. So it will extract text from screenshot.
So now let's give it a try. I'll use Plus here. I'll grab this bit of text that's on the screen
and you could see the result is actually text taken from the screenshot in the first set.
Now let's take a look at what happens if we run this and select more than one line
of text. I'm actually going to select the text here on the right side of the screen.
I have several lines of text. You could see it only seems to show the first line. But in
fact if you look closely it says Page one of five. I can use the arrow here to go through
the different lines. If I switch to List View you could see it took every line of text and
placed it in a separate item in what's called a List, an array of elements. So
I actually have five different elements that have been captured by Extract Text.
Let's look over here and we can see that under text there's also combined text. If you look at
the info for it we see it joins the text together, inserting a separator between each join. Let's
try that. I'm going to double click there to add it and it will combine text from the
image. It's going to correctly say, okay I'm going to grab the results of the last action.
What am I going to use to combine these? I can use New Line, Spaces, or any Custom characters.
Spaces might work great if you're capturing paragraphs of text. But let's just use New Lines
here. Now if we run this and I try to capture some text that's in several lines like this,
it's actually going to combine them together putting a new line between each.
So there's no List here. Just some text with each line of text on a separate line here.
Now to finish this off let's have this go to the Clipboard because we're not going to be running
this in Shortcuts. We're going to be running this outside of Shortcuts and we just want to
simply capture the text and then paste it into whatever we're doing. So let's just search for
Clip and I can see Copy to Clipboard. Use that. Now it's going to copy the combined text to the
Clipboard. So notice I have lines for each one of these connecting them. So it automatically
did that. I could always click here and clear this out. Click here again and then do things
like select Magic Variable, click on Combine Text, and that will create the line there. But because
I did it nice and cleanly, building each step one after the other, it added the lines automatically.
So now let's give this a try. I'm going to run it and I'm going to capture something. Let's capture
this text here on the screen. You could see it gives the output here but most importantly it
copied it to the Clipboard. So let's go take a look here. I'm going to run TextEdit and then
I'll use Command V for paste and you could see I get the text there. Let's give this a name.
We'll call this Screen Capture Text to Clipboard. Then let's decide how we're going to use this.
To start I'm going to click here and say that I want to Pin it in the Menu Bar. That will make
it appear here. So I could do that. Now you can see it appears there. So now I can Quit or Hide
Shortcuts and I can actually use this. Typically you may use this on a webpage that doesn't seem to
allow you to select and copy text or with an image that has text in it but it's not actual text.
It's actually pixels in the image. Sometimes you have an app like here in The App Store where you
can't copy the text. There's no way to select this text and copy it. So we can use our Shortcut for
that. Go to the Menu here. Screen Capture Text to Clipboard. Then select this text like that.
Now if I switch to TextEdit and paste you can see it pasted the text in.
Let's make it even easier to use. I'm going to select Use As Quick Action here
and then I'm going to add a keyboard shortcut. Notice it checks off Services Menu so it will
appear in the Menu Bar now. You want to make sure that stays checked. I'm going to run it with
Command Shift 7 which makes sense since Command Shift 3, 4, 5, 6 are different kinds of screen
capture. So we'll make Command Shift 7 screen capture and then copy the text to the Clipboard.
So here's another place where you can't copy text. Let's say you go into System Preferences
and you go into one of the preference panes here and a lot of time there's text like this.
You may want to copy and paste it to a help document or something and you can't copy it.
So we could click here and choose this. But we also have in the Services Menu the ability to do
it right here. You can see there's the keyboard shortcut. So let's use the keyboard shortcut
and now I can select it. If I switch to TextEdit, paste, there it is!
You could use this for all sorts of things. As I said before a lot of times webpages restrict what
you can copy from them so this is useful there. Sometimes selecting something isn't very easy
like if you want to get data from this table you may have to use their export function or
something like that. But if you want to quickly grab some data like this you could use your
keyboard shortcut here and then just grab what you want like that. Now I'll paste this into TextEdit.
I can just do a little bit of work reformatting that adding tabs, commas, whatever I want
to get what I want without having to struggle with website export or copy functions. Or any app where
there's text that you want to copy but there's no real obvious way to get the data as just
text. Like here in the Music App I can copy this list of songs here and paste into an app.
Note this doesn't work the same way on the iPhone or iPad. You can enable it for that
but there is no way to take an interactive screenshot. It will just revert to taking a
capture of the whole screen and then giving you all the text it can find. Which may actually be
fine depending on your needs. Hope you found this useful. Thanks for watching.