yiff_toolkit / scripts /anti_afk.py
k4d3's picture
awoo
4f3dcb6
raw
history blame
No virus
449 Bytes
import pyautogui
import random
from time import sleep
while True:
# Wait for a random interval between 1 and 6 minutes
wait_time = random.randint(10, 150) # 60 seconds * (1 to 6 minutes)
print(f"Waiting {wait_time} seconds.")
sleep(wait_time)
print("Pressing <Enter> and <Backspace> key!")
# Press the Enter key
pyautogui.press("enter")
# Press the Backspace key immediately after
pyautogui.press("backspace")