Interceptor
Interceptor copied to clipboard
Mouse clicks doesn't work on Windows 10
I tried to change the MouseState enum values with no success.
By the way, thanks for great project!
Hello Barak i see you fix the problem checking stackoverflow. https://stackoverflow.com/questions/47151718/simulate-mouse-clicks-in-kernel-space I think you make reference to mouse id InterceptionDriver.Send(context, 12
Please can explain how you do? What number should be instead 12?
Really apreciated some help
Hi,
To get the mouse id:
- Set both keyboard filter and mouse filter when initialising the input object.
input = new Input();
input.KeyboardFilterMode = KeyboardFilterMode.All;
input.MouseFilterMode = MouseFilterMode.All;
bool isLoad = input.Load();
- Add a global variable mouseId in Intercepter.Input.cs
-
private int mouseId;
- Get the mouse id in DriverCallback function (Also in Intercepter.Input.cs)
private void DriverCallback()
{
....
if (InterceptionDriver.IsMouse(deviceId) > 0)
{
-
mouseId = deviceId; if (OnMousePressed != null) { ....
- Change the mouse from 12 to mouseId in the following functions
SendMouseEvent
MoveMouseBy
MoveMouseTo
Remember to the bool useDriver from false to true.
On my platform the correct mouse device is 11.
Thank you. saved my life. mine was also 11.
Yup, correct device is 11
For anyone not being able to send mouse clicks, try going into the Inteceptor.SendMouseEvent method
and in the line
InterceptionDriver.Send(context, 12, ref stroke, 1);
change the 12 to 11, so now the line looks like this
InterceptionDriver.Send(context, 11, ref stroke, 1);