Exemplo n.º 1
0
        private void ClickMouseButton_Click(object sender, EventArgs e)
        {
            if (!GetWindow())
            {
                return;
            }

            var x      = 100;
            var y      = 100;
            var amount = 1;

            if (ClickXCoord.Text.Length > 0)
            {
                x = int.Parse(ClickXCoord.Text);
            }
            if (ClickYCoord.Text.Length > 0)
            {
                y = int.Parse(ClickYCoord.Text);
            }
            if (ClickAmount.Text.Length > 0)
            {
                amount = int.Parse(ClickAmount.Text);
            }

            Clicks.ClickUsingMouse(ControlHandle != (IntPtr)0x0 ? ControlHandle : WindowHandle, new Point(x, y));
        }