1

I need to write a program in any programming language (preferably Delphi 7 / Delphi 10 / C#) that emulates pressing 1 every 10 seconds to a given process in Windows XP or Windows 7. Sending Windows messages, which worked for all the other applications I have tried, didn't work for this particular one and I am suspecting it is because it is using DirectX. Can this be done without overwriting DX*.DLL files? How?

Thank you,
Tom

EDIT: I've just tried using SendInput (in Delphi 7 on Windows XP with code from http://www.swissdelphicenter.ch/torry/showcode.php?id=220) and that doesn't work, either

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Tom
  • 6,991
  • 13
  • 60
  • 78

3 Answers3

1

If the application don't process WM_CHAR/etc Windows Messages (XInput/DirectInput) your best bet is to make a dll to inject into the app overriding some of the functions cause those use directly the system resources to access the keyboard/mouse/gamepad. (really bad idea to use DirectInput/XInput for keyboard anyway :|)

feal87
  • 927
  • 3
  • 11
  • 29
0

The application is probably using DirectInput or XInput. There is little you can do in this case because DirectInput works directly with the keyboard driver.

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
0

Finally, I've used IO.DLL, which unfortunately doesn't work on 64-bit, but I'm still happy that about 90% of my target uses 32-bit.

Tom
  • 6,991
  • 13
  • 60
  • 78