/// <summary> /// Clicks inside a circle defined by the center of the circle as point and maximum distance as the radius. /// Uses the ellipse distribution. /// </summary> /// <param name="point"></param> /// <param name="max_dist"></param> /// <param name="mouse_button"></param> public static void Click(Point point, int max_dist, MouseButton mouse_button) { Point click_point = ellipse_distribution.Click(new Button(max_dist * 2, max_dist * 2)); point.Offset(click_point.X - max_dist, click_point.Y - max_dist); Click(click_point, mouse_button); }
public static void MoveClick(Rectangle rectangle, MouseButton mouse_button) { Console.WriteLine("MoveClicking() " + rectangle.ToString()); Point click_point = rect_distribution.Click(new Button(rectangle.Width, rectangle.Height)); click_point.Offset(rectangle.Location); Move(click_point); //Thread.Sleep(1000); Click(click_point, mouse_button); }