try:
for action in actions:
pyautogui.moveTo(action['x'], action['y'])
time.sleep(0.1) # 等待 0.1 秒
except KeyboardInterrupt:
print("重放結束。")
# 錄製動作
actions = record_actions()
# 重放動作
replay_actions(actions)
--------------------------------------------------------------------------------------------------------------------------------擬人化
import pyautogui
import time
import random