A python project to finish the 1 to 50 Game within 2 secs π using Tesseract OCR engine
This is a fun project i made for solving the 1to50 game available at https://zzzscore.com/1to50/en/
Make sure to try it out yourselves first. The project works only for this website. You can follow me to get more awesome projects π
- Windows OS
- Internet Connection (LOL)
- Tesseract installed on PC which you can get here -> https://digi.bib.uni-mannheim.de/tesseract/ (Just download any .exe file and install and add the exe file path to system variables)
-
Clone or Download the project to your PC.
-
Open https://zzzscore.com/1to50/en/ in your browser of choice.
-
Scroll down until the grey line below the advert in exactly below the timer 0.00.
-
Printscreen and paste image in paint.
-
Make sure these values are same in the code. If not then change it.
-
Pip install all the required libraries
pip install pillow pynput numpy time pyscreenshot
-
Now run the code and switch to the game tab.
-
By default press the left ctrl button and see the magic happen.
The code simply takes a screenshot of the screen area twice. Once initially and once when the first 25 are clicked. The screenshot is processed, tiled to 25 images, recombined with a buffer for high accuracy and then sent for OCR using tesseract. The output list is mapped for the position of each number and mouse is moved and clicked.