Py鼠标键盘模拟

from pynput.mouse import Button,Controller as mouse_cl
from pynput.keyboard import Key,Controller as key_cl
import time
def send(string):
    mouse = mouse_cl()
    mouse.press(Button.left)
    mouse.release(Button.left)
    for i in range(10):
        key = key_cl()
        key.type(string)
        key.press(Key.enter)
        key.release(Key.enter)
if __name__ == '__main__':#运行
    time.sleep(3)
    send('爹')

  

上一篇:『德不孤』Pytest框架 — 5、Pytest失败重试


下一篇:mysql 8.0.18 小白安装教程