0

I was making a python project that could play online games and i had a problem. I wanted to make the computer create a user but to do so you had to write in a name. I tried using ctypes but that didnt work out because i couldnt find any way to write letters, only click and move the cursor. Does anyone know a way to make python take control over keyboard? I am thinking something like this:

import ctypes
import webbrowser

webbrowser.open("www.url.com")

ctypes.key.a()
ctypes.key.c()
ctypes.key.c()
ctypes.key.enter()
jotjern
  • 460
  • 5
  • 18

1 Answers1

0

I would recommend pyautogui. It is as simple as pyautogui.press('b').

jotjern
  • 460
  • 5
  • 18