Created
May 18, 2023 13:53
-
-
Save chuongmep/084aed8f7587816124a2543d3cde3154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import pyautogui | |
# define the duration of the automation (in seconds) | |
duration = 6 * 60 * 60 # 3 hours | |
# define the interval between clicks (in seconds) | |
interval = 6 | |
# calculate the number of clicks required | |
num_clicks = duration // interval | |
# loop through the number of clicks and perform the click operation | |
for i in range(num_clicks): | |
# get the current mouse position | |
#x, y = pyautogui.position() | |
#print(x, y) | |
pyautogui.click(1336,968) | |
time.sleep(interval) | |
pyautogui.hotkey('ctrl', 'r') | |
time.sleep(interval) | |
# fresh web page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment