private static void ClickTrustedSites(IntPtr window) { var rect = new WindowHandleInfo(window).GetWindowRect(window); MouseClick.Execute(window, new Point(rect.Left + 213, rect.Top + 126)); System.Threading.Thread.Sleep(1000); }
private static void ClickLocalIntranet(IntPtr window) { var rect = new WindowHandleInfo(window).GetWindowRect(window); MouseClick.Execute(window, new Point(rect.Left + 133, rect.Top + 124)); System.Threading.Thread.Sleep(1000); }
private static void ClickSecurityTab(IntPtr window) { var rect = new WindowHandleInfo(window).GetWindowRect(window); MouseClick.Execute(window, new Point(rect.Left + 90, rect.Top + 46)); MouseClick.Execute(window, new Point(rect.Left + 90, rect.Top + 46)); MouseClick.Execute(window, new Point(rect.Left + 90, rect.Top + 46)); MouseClick.Execute(window, new Point(rect.Left + 90, rect.Top + 46)); System.Threading.Thread.Sleep(1000); }
private static void Click(IntPtr window, string startsWith) { var children = new WindowHandleInfo(window).GetAllChildHandles() .Where(c => WindowTextMatches(startsWith, c)) .ToList(); children.ForEach(c => Debug.WriteLine($"{c.WindowText} {c.ClassName}")); var pos = new Point(children.FirstOrDefault().Rect.Left + 10, children.FirstOrDefault().Rect.Top + 10); MouseClick.Execute(window, pos); System.Threading.Thread.Sleep(1000); }