Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public void sendKey(IntPtr hwnd, string string_0)
 {
     for (int i = 0; i < string_0.Length; i++)
     {
         Thread.Sleep(10);
         MockInput.SetForegroundWindow(hwnd);
         SendKeys.SendWait(string_0.Substring(i, 1));
     }
 }
Ejemplo n.º 3
0
 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));
     }
 }
Ejemplo n.º 4
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)));
     }
 }