Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def pixelsearch():
- base = (lowerright[0] - upperleft[0])
- height = (lowerright[1] - upperleft[1])
- targetx = (upperleft[0])
- targety = (upperleft[1])
- while pyautogui.pixelMatchesColor(targetx, targety, (bobberrgb),tolerance=5) == False:
- if targetx < (targetx + base):
- targetx += 1
- elif targety < (targety + height):
- targety += 1
- targetx = (upperleft[0])
- else:
- continue
- pyautogui.click(targetx, targety)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement