I am writing a program that uses SendInput function to simulate the mouse events to play fruit ninja for PC. But when I called SendInput, the mouse moved but nothing happened on the game screen. Could anyone tell me why it doesn't work and give me some solutions? I programmed on C# and used [dllimport] to call SendInput function.
Thanks.
SendInput is blocked in fruit ninja for pc
418 views Asked by AudioBubble At
1
I suggest You are simulating only
mouse move. You should simulatemouse drag. First domouse down->mouse move->mouse upHere some code from my old project:
Using:
Here are some more suggestions: Also the issue can be in
SynchronizationContextand/or Threading if you want to click outside the main form of your application. Possible solution:Now edit the Drag action class:
Almost forgot:
I've just created simple solution with this code, and it works fine. If you want I can send you it by email or something.