Skip to content

Instantly share code, notes, and snippets.

@yazdipour
Last active February 2, 2019 07:33
Show Gist options
  • Save yazdipour/5b8b32d8aded360b0c33b39acb4532c3 to your computer and use it in GitHub Desktop.
Save yazdipour/5b8b32d8aded360b0c33b39acb4532c3 to your computer and use it in GitHub Desktop.
#https://github.com/chriskiehl/pyrobot
from pyrobot import Robot, Keys
Y ,A ,S ,D ,F = 410, 125, 135, 235, 335
black = (17,17,17)
robot = Robot()
print('Ready\n');robot.sleep(3);print('Go\t')
for var in range(0,1000):
robot.sleep(.05)
if robot.get_pixel(A,Y) == black:
robot.move_and_click(A,Y,button='left')
elif robot.get_pixel(S,Y) == black:
robot.move_and_click(S,Y,button='left')
elif robot.get_pixel(D,Y) == black:
robot.move_and_click(D,Y,button='left')
elif robot.get_pixel(F,Y) == black:
robot.move_and_click(F,Y,button='left')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment