Last active
September 13, 2021 09:33
-
-
Save conf8o/ab17132e76ed9f2f23c9e91372f4b06a 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 pyautogui as auto | |
import time | |
import random | |
def hold(key: str, duration: float, natural: bool=True, sd: float=0.05): | |
duration += random.gauss(0, sd) if natural else 0 | |
t = time.time() | |
while time.time() - t < duration: | |
auto.keyDown(key) | |
while True: | |
hold("d", 0.1) | |
hold("a", 0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment