Administrator
发布于 2026-06-21 / 12 阅读

刷屏

pip install pyautogui pynput
import pyautogui
import os
while True:
    i = 0
    a = ""
    b = 0
    pyautogui.FAILSAFE = False
    while True:
        try:
            a = int(input("1.无限模式\n2.有限模式\n3.退出"))
        except:
            print("请输入正确的输入")
            continue
        else:
            if a==1 or a==2 or a==3:
                break
            else:
                print("请输入1或2或3的数字")
                continue
    if a==1:
        while True:
            pyautogui.hotkey('ctrl','v')
            pyautogui.hotkey('enter')
            i += 1
            print(i)
    elif a==2:
        while True:
            try:
                b = int(input("请输入要复制多少消息"))
            except:
                print("请输入正确的输入")
                continue
            else: break
        while True:
            pyautogui.hotkey('ctrl','v')
            pyautogui.hotkey('enter')
            i += 1
            print(i)
            if i == b:
                print("已结束")
                break
    elif a==3:break
    os.system("cls")


评论