#๐ pythonn gui
20 messages ยท Page 1 of 1 (latest)
@cunning jungle
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.
i have the code but for some reason is not auto press
i use pynput
pyautogui sometimes works better for me. I'm not sure why.
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")
pynput is more intuitive and way smaller
Yeah
That's definitely true, but for some reason, with game inputs, sometimes it doesn't work for me.
thank you guy so much ima try it out rn
for both you gotta download the libraries first
go to your terminal and type "pip3 install" and whatever library you chose
i change to pynput and it work for me
so in cmd, youd go:
does it already work?
yeaaaaa
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?
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.