import pyautogui, time, sys, os
import pyautogui as py

## A nice small terminal window.
os.system('mode con: cols=45 lines=10')

print('All New "Add an Advert" v.01.04.22 - starting in 15 seconds')
    
time.sleep(10)

## Open LOCALS playlist from Spotify MAIN page.
pyautogui.moveTo(50, 505, 5)   ## Move mouse pointer to coords takes 5 seconds.
pyautogui.click(button='left') ## Left-click the mouse.

## Open pop-up menu at item 1 on LOCALS playlist, three-dot-menu (...)
pyautogui.moveTo(1537, 574, 5)  ## Move mouse pointer to coords takes 5 seconds.
pyautogui.click(button='right') ## Right-click the mouse.

## Add item to play queue.
pyautogui.moveTo(1376, 605, 5)  ## Move mouse pointer to coords takes 5 seconds.
pyautogui.click(button='left')  ## Left-click the mouse.

## Once at this stage, need to wait 10 minutes, move to next item, add to queue.


print('Hopefully that worked with one advert - just got to add more after XX minutes..in progress')


