#I cannot click the mouse with Python in the game I am playing.
1 messages · Page 1 of 1 (latest)
Show code
import pyautogui
import time
List of coordinates
coordinates = [(743, 442), (797, 451), (842, 444)]
Right-click at each coordinate
for coord in coordinates:
pyautogui.moveTo(coord[0], coord[1])
pyautogui.click(button='right')
time.sleep(5) # Wait for 5 seconds
Smells like ChatGPT, someone else might feel like helping
should probably just use the mousedown and mouseup with a short delay between them though, I'd guess the click is too short
Works fine outside the game screen, but doesn’t click when on the game screen.
Most games don't really like pyautogui
Python moment
😦