Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyautogui.write() does not work correctly in Microsoft Teams. #896

Open
g-abilio opened this issue Dec 11, 2024 · 0 comments
Open

pyautogui.write() does not work correctly in Microsoft Teams. #896

g-abilio opened this issue Dec 11, 2024 · 0 comments

Comments

@g-abilio
Copy link

While trying to automate a task that involved writing a text inside a Microsoft Teams chat, the function pyautogui.write() did not worked correctly. The method call was the following:

pyautogui.write("testing automation") 

and the result was the message "tsting au" being written in the console of the Teams chat. To solve this problem, I defined the following function (inspired in the function proposed at issue #259):

def workaround_write(text):
    pyperclip.copy(text)
    gui.hotkey("command", "v", interval = 0.1)
    pyperclip.copy('')

which solved the problem, that is, calling workaround_write() instead of pyautogui.write().

All the code was done in a macOS Monterey 12.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant