Пример #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);
 }
Пример #2
0
        public static void press_key(char char_0)
        {
            byte num = MockInput.getkeycode(char_0);

            MockInput.keybd_event(num, 0, 0, 0);
            MockInput.keybd_event(num, 0, MockInput.KEYEVENTF_KEYUP, 0);
        }
Пример #3
0
 public static void Multi_Ctrl_Any(byte byte_0)
 {
     MockInput.keybd_event(17, 0, 0, 0);
     MockInput.keybd_event(byte_0, 0, 0, 0);
     MockInput.keybd_event(17, 0, MockInput.KEYEVENTF_KEYUP, 0);
     MockInput.keybd_event(byte_0, 0, MockInput.KEYEVENTF_KEYUP, 0);
 }
Пример #4
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));
     }
 }
Пример #5
0
 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]);
     }
 }
Пример #6
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));
     }
 }
Пример #7
0
        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);
        }
Пример #8
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)));
     }
 }
Пример #9
0
 public static void MultiKey_Ctrl_V()
 {
     MockInput.Multi_Ctrl_Any(86);
 }
Пример #10
0
 public static void MultiKey_Ctrl_Enter()
 {
     MockInput.Multi_Ctrl_Any(13);
 }
Пример #11
0
 public static void MultiKey_Ctrl_C()
 {
     MockInput.Multi_Ctrl_Any(67);
 }
Пример #12
0
 public static void Key_ESC()
 {
     MockInput.keybd_event(27, 0, 0, 0);
     MockInput.keybd_event(27, 0, MockInput.KEYEVENTF_KEYUP, 0);
 }
Пример #13
0
 public static void Key_Enter()
 {
     MockInput.keybd_event(13, 0, 0, 0);
     MockInput.keybd_event(13, 0, MockInput.KEYEVENTF_KEYUP, 0);
 }
Пример #14
0
 public static void Key_BackSpace()
 {
     MockInput.keybd_event(8, 0, 0, 0);
     MockInput.keybd_event(8, 0, MockInput.KEYEVENTF_KEYUP, 0);
 }
Пример #15
0
 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);
 }