Share it with your friends Like

Thanks! Share it with your friends!


Hello! Today I will show you how to make image recognition bots as fast as possible using Python. I will cover the basics of Pyautogui, Python, win32api and by the end, you should be able to make a bot for pretty much any game.

Here are the commands to run and code to paste:

All code can be found here:

If this video helped you please consider subscribing and leaving a like, it helps a ton!

If you have any errors/suggestions please let me know!

Discord server:



Kian Brose says:

Hello there! A lot of you are getting similar issues so here is an “FAQ” of what to try to fix it:
1. Uninstall python 3.8+ and install python 3.7 64 bit instead. Note that uninstalling the previous version is important or you may get missing library issues. You will have to reinstall the libraries at the start of the video.

2. DO NOT USE PYCHARM OR VISUAL STUDIO WHEN RUNNING THE CODE. These programs require additional setup which I did not include in the video. Please use the idle editor to RUN the code. Feel free to edit or write the code in any editor, but run it with idle.

3. There's a new bug as of 2020-11-04 where you may get this error: ImportError: numpy.core.multiarray failed to import. This is due to the numpy 1.19.4 package which is required for opencv being broken. To fix it uninstall numpy with "pip uninstall numpy" and install the non-bugged version with "pip intall numpy==1.19.3"

If you still have issues:
– The script moves the mouse but doesn’t click:
This is due to the delay between the LEFT DOWN and LEFT UP in the click function being too low. This means that the click is happening too fast and that either your computer is too slow to register it or the computer or whatever program you are using detects it as a “fake click”. To fix it just add more delay, I recommend a time.sleep(0.5)

Tomé Sadones says:

The video is very well structured, you give clear instructions and the explanation is easily understandable : I love it ! Good job !

Immortal Music says:

Hi there, I am in need of an auto donation bot for Clash of clans that can donate loons(troop) to all requests. Can you please make a tutorial on it?

Kartikey Singh says:

Why are you using white as background, what kind of psychopath are you?

Royals 93 says:

Hey hey hey I have a question can we make a macro like that in lua script.

Alan Campbell says:

GREAT Pace! The whole video covers a lot, very quickly – so it's not too long.
It also has plenty of detail, so I can come back later and replay / pause to get any fine points I missed on the first run.

Munkh Tulga says:

That pyautogui.displayMousePosition is not working. Mine is saying 'The Pillow package is required to use this function'.

2good@games says:

I'm trying to make that aimbooster aimbot thing lol but its too hard and I'm tryna find out how to make my cursor move to a specific color, any tips/help, thanks 😀

The Spontaneous TOMATO!! says:

Is it possible to make these bots in C# (not using the same code obv)

John Kay says:

Very good video, keep it up!

Sheez - شيز says:

Kian Brose: allow flash if you want
me in 2021: now that's a name i've not heard in a long time

Arthur Rosa says:

To get the area pyautogui is gonna check u just need to use "pyautogui.position()" at the upper left side of the image and then use it again at the lower right side, U will know the starter position of the screenshot and by subtracting the end by the start (the second "pyautogui.position()" output less the first "pyautogui.position()" output) you will get the screenshot size
Like this:
>>> pyautogui.position()
Point(x=0, y=102)

>>> pyautogui.position()

Point(x=1347, y=726)
>>> 1347 – 0
>>> 726 – 102
>>> iml = p.screenshot(region=(0, 102, 1347, 624))

>>>"[Where you want it to save]test.png")

Tetanum Teteu says:

Dude how did you get that image files(little hard to explain)

Rt Sayochi Kun says:

you can just "if 100 < b < 255:" for ranged color detections iirc

Johannes - Eu Quero Falar Alemão says:

Well done!!

Sai V says:

Hello, can u help me with this
Python path added
pip done but still Im getting this
Traceback (most recent call last):

File "<pyshell#0>", line 1, in <module>

import pyautogui
ModuleNotFoundError: No module named 'pyautogui'

Francis Ignalig says:

Can someone form codes, i want to click to a certain coordinate when a certain time passes is it possible

Eugene Irwin says:

what idle r u using?

Dankiel Fowls says:

Mine is having an error saying ModuleNotFoundError: No module named 'win32api'

Also isn't this just teaching people how to make an aimbot?

Risk CatriaX says:

it says the pillow package is required to use the function… pyautogui.displayMousePosition()

Ronnie Ajax says:

Nice bro.
it was fun tutorial.

Jonášova Videa says:

Now is flash player dead 🙁

FiireWiinter says:

"Start by going to, enable flash player"
This didn't age well

Emperor Dan says:

its not turning into a python script

Write a comment


DARPA SUPERHIT 2021 Play Now!Close


(StoneBridge Mix)

Play Now!