OCR DONT WORK

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
corfont
Newbie
Posts: 6
Joined: Thu Mar 05, 2020 1:52 am

OCR DONT WORK

Post by corfont » Thu Mar 05, 2020 2:05 am

Hi, I have downloaded the trial version and I am trying to make a macro that recognizes image numbers.
He only recognizes me letters but not numbers. What can be done there?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: OCR DONT WORK

Post by Dorian (MJT support) » Thu Mar 05, 2020 10:47 am

It should recognize both. There's no logical reason for it to recognize one and not the other. Do the numbers look different in any way? Is there an inconsistent background to them? That will often prevent OCR from working, but that would be the same for the letters. If it's captcha type text you're trying to recognize, that's specifically designed to be difficult, and not something Macro Scheduler is designed to do.

Please feel free to post your image and your code here.
Yes, we have a Custom Scripting Service. Message me or go here

corfont
Newbie
Posts: 6
Joined: Thu Mar 05, 2020 1:52 am

Re: OCR DONT WORK

Post by corfont » Thu Mar 05, 2020 4:44 pm

Hi. I'm doing a bot for an online roulette, and it doesn't capture the numbers of one digit, but those of two digits do.
Then I did a test with windows PAINT, I put the number 8 and does not recognize it (sharp, white background, black, size 72),

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: OCR DONT WORK

Post by Dorian (MJT support) » Fri Mar 06, 2020 9:31 am

I'm not sure if I am using the same font you used in Paint, but I was able to recognize all digits with OCRArea.

To generate this code go to : Code Builders > Text Capture > Screen OCR Wizard.
Check the "OCR Screen Rectangle" box. Click the "Draw" button.
Draw a rectangle around the area you wish to capture.
Click "Insert Code"

On the game itself, I am wondering if the image you're trying to capture is actually on the wheel, which may be causing it to be skewed slightly?
OCRnumbers.png
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: OCR DONT WORK

Post by Marcus Tettmar » Fri Mar 06, 2020 12:43 pm

Macro Scheduler's OCR functions are designed to work against known Windows fonts. Screen fonts. Is your game using a non-standard font, or maybe it isn't actually a font?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

corfont
Newbie
Posts: 6
Joined: Thu Mar 05, 2020 1:52 am

Re: OCR DONT WORK

Post by corfont » Wed Mar 11, 2020 2:01 pm

Image
prueba.png
Hi Dorian,
Indeed if you use OCR for the 10 digits, it works. The problem is when I try to recognize text for a single number.

It doesn't make sense, but I've done several tests, with different types of letters and it doesn't work.
I attached the screen and the code.

Thank you very much for your answer

corfont
Newbie
Posts: 6
Joined: Thu Mar 05, 2020 1:52 am

Re: OCR DONT WORK

Post by corfont » Wed Mar 11, 2020 2:04 pm

Hi Marcus,
It is true what you say about the source, I am using caliper, but the problem arises when I only recognize a digit, as I put it in the previous comment.
I hope you can help me.
Thanks for your recommendation.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: OCR DONT WORK

Post by Marcus Tettmar » Mon Mar 16, 2020 2:18 pm

I am seeing similar results when trying to get an area containing only one character. But when I use OCRWindow I get the text ok. Are you seeing the same thing?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts