Ejemplo n.º 1
0
        public static void PlayMouse(Interfaces.MouseData m)
        {
            //Set mouse position
            WinUserDll.SetCursorPos(m.point.x, m.point.y);

            switch (m.mouse)
            {
            case System.Windows.Forms.MouseButtons.Left:
                WinUserDll.mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, m.point.x, m.point.y, 0, 0);
                break;

            case System.Windows.Forms.MouseButtons.Right:
                WinUserDll.mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, m.point.x, m.point.y, 0, 0);
                break;
            }
        }
Ejemplo n.º 2
0
 public static void PlayKeyboard(Interfaces.KeyboardData k)
 {
     WinUserDll.keybd_event((byte)k.keyboard, 0, KEYEVENTF_EXTENDEDKEY, 0);
     WinUserDll.keybd_event((byte)k.keyboard, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
 }