Last active
September 18, 2017 18:06
-
-
Save SauravKanchan/1997459e9a81ac1c00ec6869072ae947 to your computer and use it in GitHub Desktop.
Playing piano tiles with PyAutoGUI
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
# -*- coding: utf-8 -*- | |
""" | |
@author: Saurav Kanchan | |
""" | |
import pyautogui as pt | |
import time | |
time.sleep(5) | |
pt.FAILSAFE = True | |
while True: | |
if pt.pixelMatchesColor(518, 557, (32, 32, 32)): pt.click(518, 557) | |
elif pt.pixelMatchesColor(622, 557, (32, 32, 32)): pt.click(622, 557) | |
elif pt.pixelMatchesColor(725, 557, (32, 32, 32)): pt.click(725, 557) | |
elif pt.pixelMatchesColor(846, 557, (32, 32, 32)): pt.click(846, 557) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment