1

The game I'm playing (uses DirectX) has stopped responding to commands sent by my python scripts based on pyautogui (somehow middle mouse clicks are still recognized, but nothing else). I've tried pydirectinput, pywinatuo and other keyboard/mouse emulation libraries, but to no avail. As a final attempt, I'm trying AHK, but the game still won't recognize any input. I'm using a simple test code that sends "b" key on repeat. So far I've tried:

  1. Sending longer key presses, the interval changed from 30 to 2000 milliseconds.
  2. Running AHK script as an Administrator (the game also runs as an administrator)
  3. Compiling the script and renaming it, as well as running it as an administrator.
  4. Running game in windowed mode
  5. Setting up a new Windows user, giving it admin privileges and running the script under its name (I hoped the game wouldn't have access to processes started by other users)
  6. Setting up a VM and running the game in it, while scripts are running outside in the host windows. The VM didn't recognize any input and was very laggy, but I guess if everything else fails, I could try it again.

I'm using Windows 10 x64, and the game is an old RPG, Lineage II. The server is private and allows botting, but nobody from the community cares about helping less experienced users, so if anyone knows ways to bypass this problem, I'm open to suggestions.

  • Have you tried using `SendInput` instead of regular `Send`? – Spyre Nov 02 '21 at 14:35
  • 1
    If all else fails, you can pretend to be a keyboard/mouse. This is of course more advanced, but it's guaranteed to work *no matter what*. [AutoHotInterception](https://github.com/evilC/AutoHotInterception) is a good C#-AHK wrapper for using the [Interception](http://www.oblita.com/interception) driver. – 0x464e Nov 02 '21 at 15:34
  • I've tried Send and Click Tool V4.1 , which used bunch of different ways to send keys to the game, two of which succeeded (CtrlSendRaw and Dllcall keybd_event). But this only happens when I disable anticheat process from the task manager, which then makes the game unresponsive. – ZebraMaster Nov 02 '21 at 18:50
  • Yeah that's likely the culprit- many modern games' anticheat specifically detect and suppress interference from programs like AHK for mostly obvious reasons. You might have better luck with the alternative @0x464e recommended. – Spyre Nov 02 '21 at 21:11
  • Interesting, I'll check it out and post the results here. – ZebraMaster Nov 03 '21 at 05:35
  • Alright, I have read your question properly now, and did more research. Did you try using `ControlSend`? Check [ControlSend](https://www.autohotkey.com/docs/commands/ControlSend.htm). Apparently [this guy](https://www.youtube.com/watch?v=NizvKom5cWU) is using that. – Timmy Chan Nov 18 '21 at 20:18
  • Thanks, that looks promising, I'll check out in the evening. – ZebraMaster Nov 20 '21 at 06:07

0 Answers0