Python pyautogui.Typewrite Korean input question.

Asked 2 years ago, Updated 2 years ago, 12 views

Hello, I have a question about Python pyautogui. import pyautogui pyautogui.typewrite('Hello world') pyautogui.typewrite ('Hello')

If I make a code like this, I can speak English well, but I can't find Korean. Why is there no Hangul? I wonder if typewrite is only English.

file = open('test.txt') pyautogui.typewrite(file.read()) I put the contents in the text file and made it like a code, but among the contents of the text file, English comes out well, and only the blanks come out in Korean...crying Is there any solution?

python

2022-09-22 13:25

1 Answers

Unicode cannot be entered.

Instead

pip install pyperclip

import pyperclip, pyautogui

piperclip.copy("Hello")

pyautogui.hotkey("ctrl", "v")

If you copy and paste the letter, it will go in.


2022-09-22 13:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.