예제 #1
0
        private void releasemouse(string s)
        {
            int button = Convert.ToInt32(s);

            if (button == 0)
            {
                VirtualMouse.LeftUp();
            }
            else if (button == 2)
            {
                VirtualMouse.RightUp();
            }
        }
예제 #2
0
        private void pressmouse(string s)
        {
            int button = Convert.ToInt32(s);

            if (button == 0)
            {
                VirtualMouse.LeftDown();
            }
            else if (button == 2)
            {
                VirtualMouse.RightDown();
            }
        }
예제 #3
0
        private void clickmouse(string s)
        {
            string[] args   = s.Split(',');
            int      button = Convert.ToInt32(args[0]);
            float    x      = float.Parse(args[1]) / 100f;
            float    y      = float.Parse(args[2]) / 100f;

            Cursor.Position = new Point((int)(Screen.PrimaryScreen.Bounds.Width * x), (int)(Screen.PrimaryScreen.Bounds.Height * y));

            if (button == 0)
            {
                VirtualMouse.LeftClick();
            }
            else if (button == 2)
            {
                VirtualMouse.RightClick();
            }
        }