IT/python

복사 붙여넣기가 안 되는 입력창에 파이썬으로 글자 복사 붙여넣는 방법

나의지식 2024. 8. 5. 21:08

content.txt안에 있는 내용을 직접 타이핑하는 방식으로 복사 붙여넣는 소스 

The way to copy and paste text using Python into an input field that doesn't allow copy-pasting, by direct typing of the contents from content.txt

import pyautogui
import time
from heconvert.converter import h2e

time.sleep(10)

with open("content.txt","r",encoding='utf-8') as f:

    for line in f:
        print(line, end='')
        converted_line=h2e(line)
        time.sleep(1)
        pyautogui.write(converted_line)

 

반응형