# How can I find numbers with OCR?

## Recommended Posts

Hi there guys, I got stuck with my own project because even though I do know what I need to use to solve my problem, which is finding numbers from the screen, I never used OCR in my life before. I tried to look out from the topic itself that talks about tesseract OCR, but it is really old and the example doesn't work anymore unfortunately. Can someone help me out please? Thank you.

##### Share on other sites

It might help if you provided more details, such as:

• Where do these numbers come from? What is the  name of the application?
• How do you intend to use them?
##### Share on other sites

First of all, thank you for replying me, anyway I already tried with memory leak and I got nothing at all. The numbers come from an application emulated by Nox, with the numbers i need to find the exact pixel point. Hope you are not thinking about bot games...

Cheers

##### Share on other sites

Post more details (screenshot) of your application

Post some details on what AU3Inf or Simplespy is revealing (see FAQ31 link below)

Check then if you really need OCR or that you can handle your application in a better way.

Tesseract OCR in general still should work if you really have to fall down to OCR. Another bitmap solution could be to use bitmap/GDI to analyse yourself if you only have to recognize 0-9 numbers in a dedicated area of your screen.

##### Share on other sites

Thank you for replying me @junkew, anyway, I'll link you the image about what I want to achieve. By doing this simple math with the code down below:

_CreateEdit(\$hEdit,\$dex)
_CreateEdit(\$hEdit,\$six)
_CreateEdit(\$hEdit,\$cen)
\$percentuale = (\$cen - \$six)/(\$dex - \$six)*100
_CreateEdit(\$hEdit,\$percentuale)
\$click = (int(531*\$percentuale/100)+71)
_CreateEdit(\$hEdit,\$click)

I want to find the 3 numbers for getting the exact pixel point where to click. Thank you again.

##### Share on other sites

What are tools as Au3Inf or simplespy giving back on the whole image.

• Do you get one red square around the window or do you see highlighting areas around the text or numbers..

Algorithm you could try (with information you get out of FAQ38)

1.  Get pixels / bitmap data after aim at:

2. Interpret the hex bitmap data yourself

##### Share on other sites

I'm a newbie with autoit, I'm sorry about that, I'm not telling you to write my code, what I'm asking is an example that let me understand how FAQ38 functions work. I tried already myself without having success. @junkew

Edited by GeneNight
##### Share on other sites

11 hours ago, GeneNight said:

Hope you are not thinking about bot games...

Well, that's what it looks like you are doing. In what other application would you need to aim at something and then click?

##### Share on other sites

3 hours ago, GeneNight said:

I'm a newbie with autoit, I'm sorry about that, I'm not telling you to write my code, what I'm asking is an example that let me understand how FAQ38 functions work. I tried already myself without having success. @junkew

2. Bitmap / pixel checking OCR etc. is not for newbies the best start.
Start first with notepad.exe or calc.exe understanding the base

3. This basically gives you all functions you should study to do what you want

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...