Guest User

Untitled

a guest
May 24th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. def click_button(self, image_name):
  2. while not pyautogui.locateOnScreen(image_name):
  3. print("looking for{}".format(image_name))
  4. x, y = pyautogui.locateCenterOnScreen(path.join("screenshots", image_name))
  5. pyautogui.click(x / 2, y / 2) #"problem" here
Add Comment
Please, Sign In to add comment