asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.24k forks source link

Made press() work with cyrillic #704

Open ElonMax404 opened 2 years ago

ElonMax404 commented 2 years ago

You couldn't ask pyautogui to write cyrillic, but there was a way around: just write cyrillic symbols with QWERTY selected, and write() that gibberish. That's ugly, so I added cyrillic, the same length as that QWERTY thing, and now it checks if the symbol is in cyrillic every press() call. If it is, it just gets its index and presses a QWERTY symbol with that index. If russian keyboard is selected - it works just fine.

Also changed that pyscreeze.locateOnWindow. to pyscreeze.locateOnScreen cuz it kept throwing an error.