How to capture text from the operating system in a practical and simple way?

1

1

Sometimes we can't select the text to copy & paste, such as dialog boxes.

Sometimes it's just not practical, such as 100 files inside a folder.

Is there any practical and simple way to capture those text from the system into a text file?

I'd wish to know both in OS X and Windows. Maybe it just can't be done today...

cregox

Posted 2013-10-16T16:05:37.983

Reputation: 5 119

1

There is also HyperSnap (also not free) and some more listed in this answer: http://superuser.com/a/493009/86828

– David Balažic – 2015-04-06T11:44:19.453

Capturing text from on screen without using copy and paste ultimately must use OCR. What technology are you referring to that's neither one of those? – Moses – 2013-10-16T16:16:35.270

@Moses I mean I tried using OCR in the past, for many other purposes... And it's not simple. Please, prove me wrong here, it would solve the problem. Also, when the computer screen displays a text it was, at some point, a text in memory, and not an image. In theory, it wouldn't require to use OCR - except maybe in some cases like java. I'm not asking about those cases, though.

– cregox – 2013-10-16T16:25:58.940

1ctrl+a, ctrl+c, open notepad ctrl+v, it really doesn't get much easier then that... – TheXed – 2013-10-16T16:38:05.417

@TheX "Select all" doesn't work. That's what I've already said in the first sentence. – cregox – 2013-10-16T16:49:24.660

You didn't say it doesn't work, you just said it wasn't practical... – TheXed – 2013-10-16T16:56:36.650

@Cawas Solving the issue of Ctrl + A not working would be much simpler than coming up with an entirely new technology to select and copy text without using OCR. – Moses – 2013-10-16T16:57:38.167

1For dialog-boxes on Windows you don't need the Ctrl+A (they don't even work there). You just set focus in the dialog, do Ctrl+C and then Ctrl+V in notepad. – Rik – 2013-10-16T18:00:32.343

@Rik now that's more like it! I was hoping for this kind of hint! Too bad that didn't work in any tests I've done. :P – cregox – 2013-10-16T20:09:42.780

It is not a complete impossibility because SnagIt can do it. I know you asked initially for free methods but this one seems to fit the bill exactly (except for the free part) including Mac and Windows. They have a trial version. (and it doesn't use OCR, it just captures the text from the window)

– Rik – 2013-10-17T09:36:19.647

@Rik yes, in fact I did mention free to complement the simple part. I saw SnagIt but it doesn't do just that. It's $49 to do a whole lot more. I don't want anything more, so I just ignored it. I thought it would use OCR, though. Interesting to know it doesn't... I haven't even tried it. – cregox – 2013-10-17T11:36:52.367

Answers

2

On OS X you can use Accessibility Inspector (in /Applications/Xcode.app/Contents/Applications/):

⌘F7 locks the currently focused element and ⌘C copies the value of the selected row.

You can also run a script like this in AppleScript Editor:

tell application "System Events" to tell process "Safari"
    value of UI elements of UI elements of window 1
end tell

Then copy the result text:

{{}, {}, {}, {missing value, false, missing value, true}, {missing value}, {}, {"windows - How to capture text from system - Super User"}, {missing value, missing value, missing value, missing value}}

Lri

Posted 2013-10-16T16:05:37.983

Reputation: 34 501

I'll accept this for now because you got exactly what I meant and I hardly will bother to look at this again. Also, it seems like this interests nobody until now. But, just to be clear, this doesn't answer for windows and it's not practical - both were requirements stated in the question! ;-) – cregox – 2013-11-07T21:56:28.430