public static void click(IntPtr hwnd, int int_0, int int_1) { MockInput.SetForegroundWindow(hwnd); MockInput.SetCursorPos(int_0, int_1); MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); MockInput.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero); }
public void sendKeyPwd(IntPtr hwnd, string string_0, int int_0, int int_1) { for (int i = 0; i < string_0.Length; i++) { Thread.Sleep(200); MockInput.SetForegroundWindow(hwnd); MockInput.SetCursorPos(int_0, int_1); MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); MockInput.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero); SendKeys.SendWait(string_0.Substring(i, 1)); } }
public static void mouseMove(int int_0, int int_1, int int_2) { MockInput.SetCursorPos(int_0, int_1); int int2 = (int_2 - int_0) / 9; MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); for (int i = 0; i < int2 + 1; i++) { MockInput.SetCursorPos(int_0 + i * 9, int_1); Thread.Sleep(20); } MockInput.mouse_event(32772, int_2, int_1, 0, IntPtr.Zero); }
public static void mouseMove(int int_0, int int_1, int int_2) { int jishu = new Random().Next(7, 15); MockInput.SetCursorPos(int_0, int_1); int int2 = (int_2 - int_0) / jishu; MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); for (int i = 0; i < int2 + 1; i++) { MockInput.SetCursorPos(int_0 + i * jishu, int_1 + new Random().Next(1, 5)); Thread.Sleep(new Random().Next(1, 100)); } MockInput.mouse_event(32772, int_2, int_1, 0, IntPtr.Zero); }
public static void inputAndClick(string string_0, int sleepSec, IntPtr hwnd, int int_0, int int_1) { for (int i = 0; i < string_0.Length; i++) { if (sleepSec != 0) { Thread.Sleep(sleepSec); } MockInput.SetForegroundWindow(hwnd); MockInput.SetCursorPos(int_0, int_1); MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); MockInput.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero); MockInput.press_key(char.Parse(string_0.Substring(i, 1))); } }
public static void click(int int_0, int int_1) { MockInput.SetCursorPos(int_0, int_1); MockInput.mouse_event(32770, int_0, int_1, 0, IntPtr.Zero); MockInput.mouse_event(32772, int_0, int_1, 0, IntPtr.Zero); }