Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import pyautogui
  2. import time
  3. pyautogui.FAILSAFE = True
  4.  
  5. screen_width, screen_height = pyautogui.size()
  6.  
  7.  
  8. def run():
  9. while(1):
  10. pyautogui.moveTo(screen_width / 2, screen_height / 2)
  11. pyautogui.click()
  12.  
  13. '''Myndir eru sóttar sem png skjöl'''
  14. time.sleep(6)
  15. pyautogui.click('FirstClick.png')
  16. pyautogui.press('down')
  17. pyautogui.press('enter')
  18. #pyautogui.click('me.png')
  19. #pyautogui.click()
  20. pyautogui.click('button1.png')
  21. time.sleep(1)
  22. try:
  23. pyautogui.click('try_again1.png')
  24. pyautogui.click('tryAgain.png')
  25. except Exception as e:
  26. time.sleep(2)
  27.  
  28.  
  29. try:
  30. run()
  31. except Exception as e:
  32. print(e)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement