import pyautogui
print (pyautogui.locateCenterOnScreen("C:\Users\Venkatesh_J\PycharmProjects\mouse_event\mouse_event.png"))
Instead of returning coordinates, it returns None
.
Seems like it couldn't find anything matching your image on the screen.
locateCenterOnScreen(image, grayscale=False)
- Returns (x, y) coordinates of the center of the first found instance of the image on the screen. Returns None if not found on the screen.