Exemplo n.º 1
0
 public bool MiddleClick()
 {
     WinIo.MyMouseKey(12, 0, 0, 0);
     Thread.Sleep(100);
     WinIo.MyMouseKey(8, 0, 0, 0);
     return(true);
 }
Exemplo n.º 2
0
 public bool RightClick()
 {
     WinIo.MyMouseKey(10, 0, 0, 0);
     Thread.Sleep(100);
     WinIo.MyMouseKey(8, 0, 0, 0);
     return(true);
 }
Exemplo n.º 3
0
        public bool MoveTo(int x, int y)
        {
            Point point = new Point();
            bool  ret   = Win32API.GetCursorPos(out point);

            if (ret == false)
            {
                return(false);
            }
            int a = point.X - x;
            int b = point.Y - y;

            if (a > 0)
            {
                while (point.X - x != 0)
                {
                    point.X = point.X - 1;
                    WinIo.MyMouseKey(24, point.X, 0, 0);
                }
            }
            if (a < 0)
            {
                while (point.X - x != 0)
                {
                    point.X = point.X - 1;
                    WinIo.MyMouseKey(24, point.X, 0, 0); //向左移
                }
            }
            if (b > 0)
            {
                while (point.Y - y != 0)
                {
                    point.X = point.X - 1;
                    WinIo.MyMouseKey(24, point.X, 0, 0);
                }
            }
            if (b < 0)
            {
                while (y - point.Y != 0)
                {
                    point.Y += 1;
                    WinIo.MyMouseKey(40, point.Y, 0, 0);  //向下移
                }
            }
            return(true);
        }
Exemplo n.º 4
0
 public bool MiddleUp()
 {
     WinIo.MyMouseKey(8, 0, 0, 0);
     return(true);
 }
Exemplo n.º 5
0
 public bool MiddleDown()
 {
     WinIo.MyMouseKey(12, 0, 0, 0);
     return(true);
 }
Exemplo n.º 6
0
 public bool RightUp()
 {
     WinIo.MyMouseKey(8, 0, 0, 0);
     return(true);
 }
Exemplo n.º 7
0
 public bool RightDown()
 {
     WinIo.MyMouseKey(10, 0, 0, 0);
     return(true);
 }