Advertisement
Haxguy

pyauto_click

Mar 1st, 2021
848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. import pyautogui, time
  2.  
  3.  
  4. while True:
  5.     pos = list(pyautogui.locateAllOnScreen('checkbox.png', grayscale=True, confidence=.8))
  6.     for p in pos:
  7.         print(f'{p.left}, {p.top}')
  8.         pyautogui.click(p.left+9, p.top+9)
  9.  
  10. # while True:
  11. #     arrowpos = list(pyautogui.locateAllOnScreen('arrow.png', grayscale=True, confidence=.8))
  12. #     for p in arrowpos:
  13. #         print(f'{p.left}, {p.top}')
  14. #         pyautogui.click(p.left+9, p.top+9)
  15. #         time.sleep(1)
  16. #
  17. #     middlepos = list(pyautogui.locateAllOnScreen('middle.png', grayscale=True, confidence=.85))
  18. #     for p in middlepos:
  19. #         print(f'{p.left}, {p.top}')
  20. #         pyautogui.click(p.left + 114, p.top + 15)
  21. #         time.sleep(.5)
  22. #     centerpos = list(pyautogui.locateAllOnScreen('centerbox.png', grayscale=True, confidence=.87))
  23. #     for p in centerpos:
  24. #         print(f'{p.left}, {p.top}')
  25. #         pyautogui.click(p.left + 281, p.top + 15)
  26. #         time.sleep(.5)
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement