Guest User

Untitled

a guest
Jan 12th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import pyautogui as py
  2. import time as t
  3.  
  4. def subscribe():
  5. count = 0
  6. while count <= 500:
  7. t.sleep(3)
  8. py.click(py.moveTo(py.locateCenterOnScreen("C:\\Scripts\\subscribe.png", grayscale=True)), duration = 0.25) #click subscribe link
  9. t.sleep(10)
  10. #py.click(py.moveTo(py.locateCenterOnScreen("C:\\Scripts\\subscribe2.png")), duration = 0.25) #click subscribe link
  11. py.click(1742,335) #click subscribe button
  12. t.sleep(3)
  13. py.hotkey('ctrl', 'w')
  14. #py.click(1888,8) #click close
  15. t.sleep(2)
  16. count +=1
  17. print ("Subs Count: "+str(count))
  18.  
  19. if __name__ == '__main__':
  20. subscribe()
Advertisement
Add Comment
Please, Sign In to add comment