Share this post

Link to post

Share on other sites

PsaltyDS 26

Since you didn't get any inteligent answers, I'll give you one of mine instead...

OCR is hard, very hard. Differences in fonts, font size, bold, italics, underlining, color, superscript, subscript, etc., etc. make it an extremely hard thing to code. If you use the Search on this forum for OCR, you'll get a lot of discussion about the dificulties. You could, just, create OCR functions in AutoIT. But they will be very limited, to a particular font and size for example, and likely very slow. Search will find you some examples, but I think you will find they were coded for very limited special circumstances.

For some idea of the level of effort that goes into and OCR project, take a look at Tesseract or the more recent OCRopus projects.

As for your actual AutoIT question, you can walk through a graphic space on the screen with For/Next loops doing PixelGetColor() and count pixels with a given color. You can even do it inside a BMP file of an image fairly straight forwardly. But interpreting what you get will become horribly complicated realy quickly, so think about other ways to get whatever it is done, too.

Share this post

Link to post

Share on other sites

eskermeko 0

Since you didn't get any inteligent answers, I'll give you one of mine instead...

OCR is hard, very hard. Differences in fonts, font size, bold, italics, underlining, color, superscript, subscript, etc., etc. make it an extremely hard thing to code. If you use the Search on this forum for OCR, you'll get a lot of discussion about the dificulties. You could, just, create OCR functions in AutoIT. But they will be very limited, to a particular font and size for example, and likely very slow. Search will find you some examples, but I think you will find they were coded for very limited special circumstances.

For some idea of the level of effort that goes into and OCR project, take a look at Tesseract or the more recent OCRopus projects.

As for your actual AutoIT question, you can walk through a graphic space on the screen with For/Next loops doing PixelGetColor() and count pixels with a given color. You can even do it inside a BMP file of an image fairly straight forwardly. But interpreting what you get will become horribly complicated realy quickly, so think about other ways to get whatever it is done, too.

Edit: From another post, there is a reference to the MODI OCR, which is the Microsoft Office Document Imaging interface. Gives you some more options if you have MS Office 2003 or later installed, but would require learning to use the COM object capabilities of AutoIT to take advantage of.

Share this post

Link to post

Share on other sites

BrewManNH 1,027

Why did you post this here? This thread is 5 years dead, with a 3 year old necroing attempt on it already. Please don't do that again.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Share this post

Link to post

Share on other sites

Melba23 2,574

You have necro-posted twice today - and both times hijacked the threads to publicize your own. Please do not do it a third time.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area