/TypeRacerBot

Win every typing race without typing

Primary LanguagePythonMIT LicenseMIT

Win every typing race without typing

How it worksInstallationHow To UseContribute

How it works

1. Using pynput.mouse we get co-ordinates (pixels) of selected screen using mouse
2. Next an in-place (not saved locally) screenshot is captured of those pixels using pyscreenshot.grab
3. This screenshot acts as input for pytesseract.image_to_string function which converts image to string
4. We polish the output string and text is now ready to be typed
5. Finally we simulate typing of this string using pynput.keyboard which will iterate over every character in string and type it out

below is bot typing a practice test

200+WPM.mov

Installation

git clone repo

git clone repo

How To Use

Usage is pretty simple as following:

  1. Start the bot by running command python3 bot.py
  2. Using your mouse draw a rectangle around text as shown below

select_text_using_mouse

  1. Bot will show text it has converted from image to text and ready to type
  2. Place your cursor where you want to type and hit backspace key

below is bot winning 🏆 a real-time multi-player typing race 🏎️

MultiPlayerRace.mov

note: you can manipulate bot's typing speed by updating it's typing delay [Default: 200+ WPM]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change/fix.

License

MIT

Other Projects

Checkout my portfolio to learn more about this and other projects