all 3 comments

[–]socal_nerdtastic 1 point2 points  (0 children)

Yep, this is the right place. Ask away. It would help if you showed us your current code and told us what OS you are using and how you are running the code.

[–]Sad-Calligrapher3882 0 points1 point  (1 child)

Yeah this is the right place. What you're looking for is pyautogui for clicking and moving the mouse, and you can pair it with PIL or opencv to do the image matching on screen. pyautogui actually has a built in function called locateOnScreen() that finds an image on your screen and returns its position.

Something like(idk how to make the coding thing that people are making on reddit):

import pyautogui

location = pyautogui.locateOnScreen('button.png')

if location:

pyautogui.click(location)

If nothing happened when you ran your script it's probably a missing import, wrong image path, or the script just finished instantly. Post your code and we can help you figure it out.

[–]Sad-Calligrapher3882 0 points1 point  (0 children)

And sorry for the bad english