public static void input(string string_0, int sleepSec) { for (int i = 0; i < string_0.Length; i++) { if (sleepSec != 0) { Thread.Sleep(sleepSec); } MockInput.press_key(string_0.Substring(i, 1).ToCharArray()[0]); } }
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))); } }