GeneNight Posted September 3, 2017 Posted September 3, 2017 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.
Danp2 Posted September 3, 2017 Posted September 3, 2017 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? Latest Webdriver UDF Release Webdriver Wiki FAQs
GeneNight Posted September 4, 2017 Author Posted September 4, 2017 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
junkew Posted September 4, 2017 Posted September 4, 2017 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. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
GeneNight Posted September 4, 2017 Author Posted September 4, 2017 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: $dex= GUICtrlRead(Int($destra)) _CreateEdit($hEdit,$dex) $six= GUICtrlRead(Int($sinistra)) _CreateEdit($hEdit,$six) $cen= GUICtrlRead(Int($centro)) _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.
junkew Posted September 4, 2017 Posted September 4, 2017 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.. Suggest to also read FAQ 38 about bitmaps and pixels. 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 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
GeneNight Posted September 4, 2017 Author Posted September 4, 2017 (edited) 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 September 4, 2017 by GeneNight
Danp2 Posted September 4, 2017 Posted September 4, 2017 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? Latest Webdriver UDF Release Webdriver Wiki FAQs
junkew Posted September 4, 2017 Posted September 4, 2017 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 1. Show more proof its not a game 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 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now