learncodebygaming / pydirectinput

Python mouse and keyboard input automation for Windows using Direct Input.
Other
501 stars 88 forks source link

Mouse Movement Not Working #17

Open Xeomia opened 3 years ago

Xeomia commented 3 years ago

I am trying to use python to create some nice and handy Minecraft scripts in order to ally coding and gaming.

I have been using pyautogui and pydirectinput for a decent amount of time and have always tried to find ways around the issue setting up stuff In-Game rather than coding it.

The mouse movements functions like move() and moveTo() do not work at all within the recent versions of Minecraft (after 1.8.9 I believe). I have tried looking in the modules themselves but I'm not experienced enough to tweak those and I do not know where to look for alternative ways to send mouse inputs.

If anyone would be kind enough to guide me on how to do it (or offer their solution if someone worked on it already).

EDIT: Forgot to look at the closed issues, there was one addressing the exact same topic, unfortunately the solution there does not work for me.

Thank you in advance for all advices, Xeomia

BrianAltrichter commented 2 years ago

Sorry I know I am very late, but I was able to get it to work by changing Controls > Mouse Settings > Raw Input and changing it to OFF. From there, I was able to use pydirectinput.move() like normal.