Advertisement
SoggyCrunch

First Working Iteration of piano tiles

Apr 11th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. import pyautogui
  2. import time
  3. import keyboard
  4. from PIL import ImageGrab
  5. pyautogui.PAUSE = 0
  6.  
  7. #time.sleep(3)
  8. #pyautogui.click(540,420)
  9. while True:
  10.     #Collum One: 420, 350
  11.     #Collum Two: 500, 350
  12.     #Collum Three: 570, 350
  13.     #Collum Four: 640, 350
  14.     if ImageGrab.grab().getpixel((800, 800))[0] == 0:
  15.         #pyautogui.click(420,350)
  16.         print("Collum One!")
  17.  
  18.     if ImageGrab.grab().getpixel((1000, 800))[0] == 0:
  19.         #pyautogui.click(500,350)
  20.         print("Collum Two")
  21.  
  22.     if ImageGrab.grab().getpixel((1140, 800))[0] == 0:
  23.         #pyautogui.click(570,350)
  24.         print("Collum Three")
  25.  
  26.     if ImageGrab.grab().getpixel((1280, 800))[0] == 0:
  27.         #pyautogui.click(640,350)
  28.         print("Collum Four")
  29.     print("End Loop")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement