Exemplo n.º 1
0
        public static void mouseClick()
        {
            var point = MouseOperations.GetCursorPosition();
            int x     = point.X;
            int y     = point.Y;

            MouseOperations.mouse_event((int)(MouseOperations.MouseEventFlags.Absolute | MouseOperations.MouseEventFlags.LeftDown), x, y, 0, 0);
            int sleep = getRandom(60, 150);

            Thread.Sleep(sleep);
            MouseOperations.mouse_event((int)(MouseOperations.MouseEventFlags.Absolute | MouseOperations.MouseEventFlags.LeftUp), x, y, 0, 0);
        }
Exemplo n.º 2
0
 public static void mouseMove(int x, int y)
 {
     MouseOperations.mouse_event((int)(MouseOperations.MouseEventFlags.Absolute | MouseOperations.MouseEventFlags.Move), x, y, 0, (int)UIntPtr.Zero);
 }