In this video you will learn how to make a simple auto clicker with image recognition that will click on an image on your screen in python. any questions or help comment down below and wait for the magic genie to help you!
PyCharm: [ Ссылка ]
Python: [ Ссылка ]
Code:
import time
import keyboard
import pyautogui
import win32api
import win32con
time.sleep(5)
def click():
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0)
time.sleep(0.1)
while not keyboard.is_pressed('q'):
start = pyautogui.locateCenterOnScreen('tMW.png', region=(0, 0, 1920, 1080), grayscale=True, confidence=0.70)
if start is not None:
pyautogui.moveTo(start) # Moves the mouse to the coordinates of the image
click()
Subscribe To Us: [ Ссылка ]
Enjoy and Thanks for Watching!
Social Media
Dragon & Pig Adventures Weibo Page: [ Ссылка ]
Dragon & Pig Adventures Facebook Page: [ Ссылка ]
Paypal Donate: [ Ссылка ] *Patreon Coming Soon*
Track: Stryer & Kelsey Ray - Waves (Royalty Free Music)
Music provided by Bify Music.
Label: Simplify.
Watch: [ Ссылка ]
Stream/Download: [ Ссылка ]
![](https://i.ytimg.com/vi/tORM72kTlUs/maxresdefault.jpg)