NOTE: Seems like there is a bug in macOS 14.5 and the screenshot capture Shortcuts action isn’t working anymore. Until Apple fixes it, I have posted a temporary fix in a Patreon video (but I have made it available to everyone, not just supporters).
You can create a Shortcut that will allow you to capture a portion of your screen, and then the text from that image will be extracted and placed in the clipboard. This is useful where you can't normally select and copy text from websites and apps.
You can also watch this video at YouTube.
Watch more videos about related subjects: Shortcuts (69 videos).
You can also watch this video at YouTube.
Watch more videos about related subjects: Shortcuts (69 videos).
Video Transcript
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.
You can download the Shortcut here.
Excellent tutorial, Gary. Shortcuts seem to be more straightforward than Automator. In your list of shortcuts, I saw Create New Note With Date. I wonder what this shortcut is about if it can be used interchangeably with iOS?
Razvan: try it out for yourself and see.
Hey Gary, brilliant tutorial for grabbing text from any screen and it works like a charm for me. However, I couldn't make the shortcut to work for me. Any help will be highly appreciated.
Akshat: Not sure from your comment whether you got it to work or didn't. If you didn't, just check everything carefully.
Terrific! Clear and concise, even for this old lady! This is going to be very useful. Thanks.
Hi Gary ! I just follow each step of your video, but it simply it doesn't work for me. The problem occurs at 1:15, because when I take the screenshot, the text is not extracted, at least, it does not appear in the configuration menu of the shortcut.
Do you have an idea of a setting a could change to make that work ?
By the way I appreciate your very instructive videos, take care of yourself and have a nice day
clemdecame: Click on the Setting button at the top right and then click Privacy. What do you see there. Also, which Mac do you have. I wonder if old Macs that maybe can't handle Live Text, can't do this.
Hi Gary this method "macOS Shortcuts: Capture Text From Your Screen" will it work on macOS Catalina? Please let me know the answer.
Lali
Lali: No. The Shortcuts app is new for macOS Monterey.
Hi Gary, super thank you! I wonder, is there a keyboard shortcut to open the Text Edit App as well as one to view the Clipboard? I've been searching with no luck. Thanks in advance.
Kathy: To open the TextEdit app (or any app) with a keyboard shortcut, you'd need something like this: https://macmost.com/create-a-mac-keyboard-shortcut-to-launch-any-app.html Of course you could also launch LaunchPad with your keyboard shortcut for that, then type "Tex..." and Return to launch it. Same with Spotlight and Command+Space. As for viewing the clipboard, that can only be done in the Finder where you can access it with Edit, Show Clipboard. So you could set a keyboard shortcut for that in SYstem Preferences, Keyboard, Shortcuts like with any other menu command.
I have several hundred photos with some text on each. Could this Shortcut be modified to automatically load each photo sequentially, get its text and append the text to a file?
Thanks,
Dennis
Dennis: Most of this Shortcut isn't related to that so I would start from scratch. But you should be able to do it by selecting the files, looping through them, adding the text to a list, and then saving them to the clipboard or a file. I don't know what sort of programming experience you have so I don't know how difficult that will be for you. But it should be possible.
Thanks Gary. Works like a charm.
I have the same issue than clemdecame : when I launch shortcut with only interactive screenshot, nothing happens (I checked with quickview or copy to clipboard). When I check settings it's totally empty (if I had copy to clipboard I see the permission for clipboard).
Thanks for your great videos.
Best regards from France
Hi Gary, another question please. I'm experimenting with shortcuts using your excellent tips and I've been playing around with taking regular screen shots (not just text) to the clipboard (as a shortcut), and have got it working. I've noticed however, that once I've used my keyboard shortcut for that particular shortcut (which works) that I have to actually quit the screenshots app for the shortcut to work again while testing it in another app like pages for example. Is this normal behaviour?Thx
Kathy: You shouldn't need to do that. Maybe try a restart?
Yes that worked. Thanks. One other thing, I tried the 'stock' Self Destructing Clipboard awhile back, and it didn't seem to work. Are there settings that need to be done to complete the setup I wonder or should it just work as is. Thanks again Gary.
Kathy: I don't know. I haven't tried that at all.
Another way to check what is in the clipboard is to use the Finder,Edit,Show Clipboard menu item.
I have the same issue than clemdecame : when I launch shortcut with only interactive screenshot, nothing happens (I checked with quickview or copy to clipboard). When I check settings it’s totally empty (if I had copy to clipboard I see the permission for clipboard).
Thanks for your great videos.
Best regards from Mexico
Hi Gary. I'm using the shortcut to extract text from newspaper stories, unfortunately the text being in columns means the extraction is jumbled between columns.
Any thoughts on extracting the text column by column?
Richard: Just select a column at a time?
I have the same issue than several other people. The action "Take screenshot" doesn't work, but all other actions work fine ("Extract text from image", etc.).
It seems that other people having this issue are from non-speaking English countries. Could it be a translation issue ?
Thank you from France
Daniel: Could be. Maybe test by changing your language/keyboard to U.S.? I could understand it affecting the extract text portion, but you say even a Shortcut with just Take Screenshot all by itself doesn't work?
1) In preferences Language/Apps, I added Shortcuts.app in English and tried again : it doesn't work
2) In preferences Language/Apps, I added Shortcuts.app in English, then I restarted the Mac and tried again : it doesn't work
3) In preferences Language/General, I chose English as main language, then I restarted the Mac and tried again : IT WORKS !
So there is really a translation bug in this action. Do you see any workaround ( apart changing my language ! ) ?
Daniel: So are you testing just the screen capture action? Or is the text part involved too? If just the capture, then it is simply a bug. Report to Apple and you'll need to hope for a fix at some point.
It's only the screen capture action, nothing else.
Can you tell me how to report to Apple ?
Thank you Gary
Daniel: If you are developer, you would sue the developer site. If not, use https://www.apple.com/feedback/
hi Gary, how do I go about editing a shortcut I made? For example rename it or change the action. I must be missing the obvious but I don't see my shortcut listed under All Shortcuts. thx
nick: Open the Shortcuts app, double-click on the Shortcut to open it and edit it. Avoid the "play" button at the top right corner when you double-click.
Great tutorial Gary. One thing that I got a little confused was when you set up the keyboard shortcut (cmd-shift-7) cmd shift & was displayed. I guess that's just how it works? Or is the software like Shortcuts context sensitive and knows when to use a 7 verse the &?
Gene: Since & and 7 are the same key, it means the same thing. Probably just a bug that shows it as a &.
Thanks Gary. It really work to capture ENG, but not for other languages, would you have any ways to capture other languages?
Jason: It should work for all of the languages supported by Live Text in macOS. If the language you wants isn't supported yet, you'll need to wait for Apple to add it. This feature is very new so give them some time.
4 months later - This is a great shortcut. I use it almost daily. Thanks.