Reputation: 1
So I'm trying to automate my Manga reading and I'm coming into the trouble of finding out how to set a duration for each event. For example if I want it to scroll for 200 seconds then click the next page at X & Y coordinates, how would I go about doing this?
Note: I understand how to make pyautogui click. I'm more concerned on figuring out how to make it time delay.
import pyautogui
speed = input('how fast should it scroll')
sleepTime = input('how long before next scroll')
pyautogui.time.sleep(3)
while 0 < 10:
pyautogui.moveTo(918, 492, duration=26, tween=pyautogui.easeInOutQuad)
pyautogui.scroll(int(speed))
pyautogui.time.sleep(int(sleepTime))
pyautogui.FAILSAFE = True
Upvotes: 0
Views: 2816
Reputation: 11
Taken from the PyAutoGUI docs
Instead of:
pyautogui.time.sleep(3)
Do this:
pyautogui.PAUSE = 3
Upvotes: 1