how can I use persian language text in pyautogui library


I want to fill some fields using pyautogui library
But the problem is that when I want to fill the fields in Persian language, it is not done
How should I solve the problem of this library in the Persian language?
I don’t even know if the problem is with this library or with my Python because this library works well for the English language

my code:

import pyautogui, y=52)
pyautogui.write("Hello World") #This part works well'tab')
pyautogui.write("سلام دنیا")  #This part does not work
Asked By: Mr2C2R



pyautogui library doesn’t support languages except English. As recommended on this post you can use pyperclip in addition to pyautogui:

import pyperclip
import pyautogui
import time, y=52)
pyautogui.write("Hello World") #This part works well'tab')

content = "سلام دنیا"

pyautogui.hotkey('ctrl', 'v')
Answered By: Marcelo Paco
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.