Skip to content

Instantly share code, notes, and snippets.

@peheje
Created May 21, 2020 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peheje/cea6f3118a76244a8d09442dbefca1bf to your computer and use it in GitHub Desktop.
Save peheje/cea6f3118a76244a8d09442dbefca1bf to your computer and use it in GitHub Desktop.
import pyautogui
import time
time.sleep(2)
def record():
while True:
currentMouseX, currentMouseY = pyautogui.position()
print("(" + str(currentMouseX) + "," + str(currentMouseY) + ")")
time.sleep(3)
dur = 0.3
def click_skip_safe():
pyautogui.moveTo(869, 420, dur, tween=pyautogui.easeInOutQuad)
pyautogui.click()
def add_album(x, y):
pyautogui.moveTo(x, y, dur, tween=pyautogui.easeInOutQuad)
pyautogui.dragTo(58, 488, dur, button='left')
click_skip_safe()
pyautogui.click()
counter = 1
skip = 7
while True:
add_album(440, 372)
add_album(733, 372)
add_album(1009, 372)
add_album(1275, 372)
click_skip_safe()
if counter % skip == 0:
scroll = 8
else:
scroll = 9
pyautogui.scroll(-scroll)
counter += 1
@peheje
Copy link
Author

peheje commented May 21, 2020

Exit pyautogui by moving mouse to any corner
You will need tinkering with the coordinates and scroll sizes to run on your PC and surveillance.

Open spotify app on albums, zoom for 4 albums on 1 row, add your playlist in sidebar and run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment