技術メモ

技術メモ

This project is maintained by kino-3

PC のアクティブ状態を維持するスクリプト

import time
import random
import pyautogui

while True:
    base_sec = 20
    scroll_size = 10
    rand = random.random()
    time.sleep(base_sec + base_sec*rand)
    pyautogui.scroll(scroll_size)
    time.sleep(1)
    pyautogui.scroll(-scroll_size)
    # クリックも必要な場合
    # x, y = pyautogui.position()
    # print(x, y, rand)
    # pyautogui.click(x,y)