Jump to content
Sign in to follow this  

Text search without OCR

Recommended Posts

Hi all,

Just an easy question, but don't know if an easy answer is possible:

I need to read text from a simple image I take with

$hwnd = _ScreenCapture_Capture(@TempDir & "\" & $textimage,50,50,200,200)

Image can be "5-lines" long (so that I need to take 5 lines of text) or just 1 line (I just need to change coords in _screencapture())

I used different trial versions of OCR SDK but now, with them expired, costs is really high to get them for my and my family/friends use.

Since the text is always in Arial format (maybe can change the dimension or the font, nothing else), i'm asking if there is a (fast) way to take that text and put it in a $var.

When I say fast i mean not so time-consuming since waiting 30 secs for reading a word it's a no-sense.

I read a thread about _imagesearch() letter by letter but I believe from an informatic point of view is horrible.

Thanks to all the community,


Share this post

Link to post
Share on other sites

Hi Marco,

did you use the search function in the example scripts forum?

The first 4 results when searching for "OCR" sound pretty much like what you're looking for.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post

Link to post
Share on other sites

I already studied about that, due to my persistence in AutoIt forums i'm supposed to know about Search functions ^^

As infact that thread says: "Forgot to tell that Office 2003 is needed"

I know that 99.99% Office is installed but my aim is to do a completely stand-alone solution.

And Tesseract aswell, i "multi"tried it, including boring teaching sessions, but results are poor.


Share this post

Link to post
Share on other sites

Google for Tesseract. It's open source OCR software.

When installed, you can OCR your screen capture like this:

ShellExecuteWait(@ProgramFilesDir & "\tesseract-OCR\tesseract.exe", "inputimage.tif ocrresult")

As you can see, it requires tif image as input and output file will be a textfile in the scriptdir

Edited by flet

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...