Python setar String where the cursor is [closed]

0

Good afternoon I need to set a string where the cursor is stopped.

Examples: - Blinking cursor stopped on a notepad, I play a string in notepad. - Blinking cursor stopped in any typing field, I set a string in the typing field.

How can I do this in Python?

    
asked by anonymous 27.11.2018 / 17:52

1 answer

1

If I understand you correctly, you can use the pyautogui module:

import pyautogui
pyautogui.typewrite('Stack Overflow em Português é demais!')

This will simulate keyboard input by entering the text where the cursor is positioned.

    
27.11.2018 / 17:57