Jump to content

Dllcall of textract.dll


Recommended Posts

I'm determined to get an OCR solution integrated into Autoit with the Textract SDK (available with 40 day free trial at Textract SDK) . Before I begin, however, I want to make sure I'm not re-invitening the wheel. I'm a bit confused as to why there is not more talk of textract sdk on these forums. It seems like the perfect solution to the OCR needs of many posters here.

My goal, a function that looks like: textract($ax,$ay,$bx,$by) that returns the OCR plain text contained in the defined rectangle.

Why doesn't anyone use this? If you need convincing of its potential, install Kleptomania from the above link. I realize it isn't the easiest thing in the world, but from some of the things I've seen you gurus post in here, I'd have thought it would have already been done. The SDK even has an ActiveX dll if that makes the process easier.

I'd appreciate any thoughts or ideas, and if there is interest I'll be looking to put together a thread/mailing list/IM contact list of individuals that can work together toward making this work.

Link to comment
Share on other sites

  • Moderators

This topic was discussed last week I believe, and has a working example. There are a couple of issues I would think.

1. Yes, it's a "40 day" trial, but that trial does end... AutoIt is free, that's not.

2. It only reads the text within your OS, which means what most would use it for (Graphical) it doesn't do any good (I've personally tested this issue).

Now, how kleptomania is set up, installing all the possible fonts it uses is a much more complete way of doing it. However, if you look at their license ... on a Per computer basis, that's a tad REDICULOUS IMHO 1, but way out of the reach for many that use this language.

I've made my own personal OCR DLL in C++ that I use for my specific tasks, but it wouldn't do any good to release it because then I'd have to spend days/weeks etc... in making the librarys for the definitions.

The only and I do mean only downfall I saw with TextTract was having to have pre defined fonts that they don't install... which keeps them from reading Adobe products as well.

Edit:

TextTract was almost like a ControlGetTextByRegion() is how I saw it in action.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I thought I'd exhausted the searching of this forum. Perhaps not. Would you happen to have a quick link to that discussion?

RE:#1. 40 day trial. Sure, it expires, but $220 is a bargain if I can integrate it smoothly. I'm not looking to build a script for distribution, and it will only live on one comp that is the main "brain" of the setup, so the liscensing isn't so much of a concern.

RE: #2. I'm not sure what you mean here, Smoke. Can you clarify? It only reads fonts that you have installed, but in my testing it was able to read those fonts when they are within an outside app. I did notice that when building the databases, Klepto found 4 fonts that the SDK did not. I have no explanation for that unless these are some of the built in fonts you speak of.

RE: Kleptomania. Again, I'm confused here. As I understand it, Kleptomania and the SDK build their font database in the same way. That is, from your installed OS fonts. I've run the examples provided in the SDK download and they do indeed build their font database in what looks like an identical way to Kleptomania does upon install.

I realize now that I would have probably been better served writing my app in VB or VC, but thousands of lines later I'm reluctant to start over.

Yes, ControlGetTextByRegion() is exactly the behavior I'm looking for, but unfortunately, I'm trying to get text off non-standard windows controls. Textract seems like the best solution by far.

Forgive me if my questions seem a bit uneducated...they are. :P I'm by no means a programmer. I've gotten this far through brute force. LOL

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...