Jump to content

I need major help reading text off of an image on a website


Recommended Posts

Basically there is an image on a site that changes, that I would like Autoit to be able to somehow read. I have come up with a few ideas;

-Navigate to the page and download the image (Not sure how to do this?) and then compare that downloaded image to images I have saved on my computer of each letter. So it will look for every letter in the image and I will be able to put them in order using the coords. I have no idea if searching for an image in another image is possible or not.

-Navigate to the page and take a screen capture, and look for the letters in the same way as my first idea. This would only be done if it is in fact not possible to save an image off a web page using auto it.

-Some sort of ridiculously complicated pixel checksum method. I would not even know where to start.

-Run an external OCR program or some other sort of OCR method.

I have looked around and couldn't find anything on this. I would even consider paying someone to write this for me as I am quite desperate.

Link to comment
Share on other sites

You could try it with ptrex's OCR code just search for "Real OCR in AU3"

that was the posts name i guess..

Well you could try it, but sometimes you will get wrong results

like 0 could be read as O or a 1 could be read as I or l

Started with AutoIt on 12th June, 2008.

Link to comment
Share on other sites

For downloading the file you can try this code:

While 1
    HotKeySet("{ESC}", "Quit")
    HotKeySet("{D}", "download")

Func download()
;Set the URL
$var = InputBox("", "Type the URL of the file:")
;Type the filename
$var1 = InputBox("", "Type the filename:")
;Download the file
$inetget = InetGet($var, $var1)
;Sleep so the file can download
$sleep = InputBox("", "Type the desired sleeptime for the file to download:")
Sleep($sleep)
FileInstall($inetget, @MyDocumentsDir)
EndFunc

Func Quit()
;Set the hotkey so you can exit it if you want
    Exit
EndFunc

If download() = @error Then
    ExitLoop
EndIf
Else
    If Quit() = @error Then
        Exit
    EndIf
    WEnd
and for searching for an image inside a image, i assume you could try PixelSearch()

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...