965-Python-Learning-Repo/Misc/copy-pigai.org.py
2024-12-04 12:43:22 +08:00

13 lines
306 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import time
import pynput
import pyperclip
print("请将文稿复制到剪切板内并切换输入法为英文延时10s")
time.sleep(10)
txt = pyperclip.paste()
pynput.keyboard = pynput.keyboard.Controller()
for i in txt:
pynput.keyboard.type(i)
time.sleep(0.015)
print("finish!")
time.sleep(2)