#๐Ÿ”’ pythonn gui

20 messages ยท Page 1 of 1 (latest)

cunning jungle
#

hey anyone have code auto press keyboard in the game??

edgy salmonBOT
#

@cunning jungle

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

cunning jungle
#

i have the code but for some reason is not auto press

rocky monolith
#

i use pynput

stiff basin
#

pyautogui sometimes works better for me. I'm not sure why.

rocky monolith
#
from pynput.keyboard import Key, Controller
keyboard = Controller() # to save on typing "pynput.keyboard.Controller.press()" every time
if keyboard.is_pressed("e"): # listen to key presses
    keyboard.press("r")
    keyboard.release("r")
    keyboard.type("hello, im new here")
rocky monolith
stiff basin
#

Yeah

#

That's definitely true, but for some reason, with game inputs, sometimes it doesn't work for me.

cunning jungle
#

thank you guy so much ima try it out rn

rocky monolith
#

for both you gotta download the libraries first

#

go to your terminal and type "pip3 install" and whatever library you chose

cunning jungle
rocky monolith
#

so in cmd, youd go:

rocky monolith
cunning jungle
#

yeaaaaa

rocky monolith
#

weird, in my mind i had to install the library first

#

i guess python changed that, does anyone else on here know if they default install those now?

edgy salmonBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.