Advertisement
SoggyCrunch

Second Piano Tiles (10 ish notes)

Apr 11th, 2021
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. import pyautogui
  2. import time
  3. from datetime import datetime
  4. import keyboard
  5. from PIL import ImageGrab
  6. import numpy as np
  7. pyautogui.PAUSE = 0
  8. #time.sleep(3)
  9. #pyautogui.click(540,420)
  10. game_coords = (800,700,1400,701)
  11. time.sleep(2)
  12. pyautogui.click(540,420)
  13. counter = 0
  14. while True:
  15.     '''
  16.     time = datetime.now()
  17.     time = time.strftime("%S")
  18.     print(time)
  19.     '''
  20.     screen = list(np.array(ImageGrab.grab(bbox=game_coords)))[0]
  21.     if screen[0][0] == 0:
  22.         #print("Collum One")
  23.         pyautogui.moveTo(400,410+counter)
  24.        
  25.     elif screen[200][0] == 0:
  26.         #print("Collum Two")
  27.         pyautogui.moveTo(500,410+counter)
  28.  
  29.     elif screen[340][0] == 0:
  30.         #print("Collum Three")
  31.         pyautogui.moveTo(570,410+counter)
  32.  
  33.     elif screen[480][0] == 0:
  34.         #print("Collum Four")
  35.         pyautogui.moveTo(640,410+counter)
  36.     counter += 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement