private static void InjectDoubleRightMouseClick(IntPtr child, NPoint clientLocation) { var lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y); MessagingMethods.PostMessage(child, Wm.Rbuttondblclk, new IntPtr(Mk.Rbutton), lParamClickLocation); Log.Debug($"Double right click on window #{child} at {clientLocation}"); }
private static void InjectLeftMouseDown(IntPtr child, NPoint clientLocation) { IntPtr lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y); MessagingMethods.PostMessage(child, WM.LBUTTONDOWN, new IntPtr(MK.LBUTTON), lParamClickLocation); #if DEBUG System.Diagnostics.Debug.WriteLine("InjectLeftMouseDownMove #" + child.ToString() + " at " + clientLocation.ToString()); #endif }
private static void InjectLeftMouseClick(IntPtr child, NPoint clientLocation) { var lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y); MessagingMethods.PostMessage(child, Wm.Lbuttondown, new IntPtr(Mk.Lbutton), lParamClickLocation); MessagingMethods.PostMessage(child, Wm.Lbuttonup, new IntPtr(Mk.Lbutton), lParamClickLocation); Log.Debug($"Left click on window #{child} at {clientLocation}"); }
private static void InjectDoubleRightMouseClick(IntPtr child, NPoint clientLocation) { IntPtr lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y); MessagingMethods.PostMessage(child, WM.RBUTTONDBLCLK, new IntPtr(MK.RBUTTON), lParamClickLocation); #if DEBUG System.Diagnostics.Debug.WriteLine("Double right click on window #" + child.ToString() + " at " + clientLocation.ToString()); #endif }
private static void InjectLeftMouseClick(IntPtr child, NPoint clientLocation) { IntPtr lParamClickLocation = MessagingMethods.MakeLParam(clientLocation.X, clientLocation.Y); MessagingMethods.PostMessage(child, WM.LBUTTONDOWN, new IntPtr(MK.LBUTTON), lParamClickLocation); MessagingMethods.PostMessage(child, WM.LBUTTONUP, new IntPtr(MK.LBUTTON), lParamClickLocation); //IntPtr lParamClickLocation2 = MessagingMethods.MakeLParam(clientLocation.X+100, clientLocation.Y+100); //MessagingMethods.PostMessage(child, WM.MOUSEMOVE, new IntPtr(MK.LBUTTON), lParamClickLocation2); #if DEBUG System.Diagnostics.Debug.WriteLine("Left click on window #" + child.ToString() + " at " + clientLocation.ToString()); #endif }