Last active
February 2, 2019 07:33
-
-
Save yazdipour/5b8b32d8aded360b0c33b39acb4532c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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