public static void HoverOverAgiHomeDropdown() { autoit.WinActivate("Home - Windows Internet Explorer"); autoit.WinWaitActive("Home - Windows Internet Explorer", "", 30); Thread.Sleep(3000); //autoit.ControlClick("Home - Windows Internet Explorer", "", "Internet Explorer_Server1", "LEFT", 1, 344, 101); autoit.MouseMove(350, 156); }
public void FocusOnDiscord() { try { auto.WinActivate("[CLASS:Chrome_WidgetWin_1]", ""); auto.WinMove("[CLASS:Chrome_WidgetWin_1]", "", 0, 0, 940, 500); System.Threading.Thread.Sleep(500); auto.MouseMove(308, 441, 1); auto.MouseClick("LEFT", 308, 441, 1, 1); } catch (System.NullReferenceException) { MessageBox.Show("Could not find the window, please try again!"); } catch (Exception e) { Console.WriteLine(e); } }
void ScrollDown() { Point startpoint = new Point(951, 12); Point endPoint = new Point(952, 202); IntPtr hWnd = IntPtr.Zero; hWnd = AutoControl.FindWindowHandle(null, "Garena - Game Center"); var child = AutoControl.FindHandle(hWnd, "Chrome_RenderWidgetHostHWND", null); var spoint = AutoControl.GetGlobalPoint(child, startpoint); var endP = AutoControl.GetGlobalPoint(child, endPoint); int[] arrEndPoint = { 202, 315, 341, 358, 432, 471, 500, 570, 630 }; AutoControl.BringToFront(hWnd); AutoItX3Lib.AutoItX3 autoItX = new AutoItX3(); autoItX.MouseMove(spoint.X, spoint.Y); autoItX.MouseDown("LEFT"); autoItX.MouseMove(endP.X, endP.Y); autoItX.MouseUp("LEFT"); }
private void button1_Click(object sender, EventArgs e) { getwindowrectangle(); au3.WinActivate(WINDOW_NAME); au3.MouseMove(rect.left + 120, rect.top + 45, 1); au3.MouseClick("LEFT"); Thread.Sleep(500); switch (counter) { case 1: au3.MouseMove(rect.left + 128, rect.top + 216, 1); au3.MouseClick("LEFT"); break; case 2: au3.MouseMove(rect.left + 366, rect.top + 223, 1); au3.MouseClick("LEFT"); break; case 3: au3.MouseMove(rect.left + 625, rect.top + 227, 1); au3.MouseClick("LEFT"); break; case 4: au3.MouseMove(rect.left + 873, rect.top + 215, 1); au3.MouseClick("LEFT"); break; default: MessageBox.Show("select a gamemode retard"); break; } Thread.Sleep(500); au3.MouseMove(rect.left + 541, rect.top + 688, 1); au3.MouseClick("LEFT"); Thread.Sleep(1500); au3.MouseMove(rect.left + 541, rect.top + 688, 1); au3.MouseClick("LEFT"); }
private void clearProxy_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); AutoItX3 au3 = new AutoItX3(); String hWnd = au3.WinGetHandle("[TITLE:VIP72 Socks Client]"); au3.MouseMove(0, 0); String hwndSTR = "[HANDLE:" + hWnd.ToString() + "]"; au3.WinSetOnTop(hwndSTR, "", 1); au3.ControlClick(hwndSTR, "", "[ID:7303]"); au3.ControlClick(hwndSTR, "", "[ID:117]", "menu", 1, 57, 35); //System.Threading.Thread.Sleep(2000); au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{DOWN}"); System.Threading.Thread.Sleep(2000); //au3.ControlSend(hwndSTR, "", "[ID:117]", "{ENTER}"); System.Threading.Thread.Sleep(2000); }
private void StartWrok() { ai.WinActivate(WIN_TITLE); ai.WinWaitActive(WIN_TITLE); while (ai.WinActive(WIN_TITLE) == 1 && repeatedly > 0) { if (ai.PixelGetColor(865, 539) == 0x26AEF6) { ai.MouseClick("LEFT", 865, 539, 1, 10); ai.MouseMove(686, 313, 10); while (ai.PixelGetColor(865, 539) == 0x26AEF6) { ai.MouseClick("LEFT", 686, 313, 1, 10); Thread.Sleep(500); } while (ai.PixelGetColor(545, 612) != 0x121415) { } repeatedly--; everyCycleAction(); } } }
private void button4_Click(object sender, EventArgs e) { AutoItX3 autoItX3 = new AutoItX3(); Point LOLlocation = new Point(805, 175); IntPtr hWnd = IntPtr.Zero; hWnd = AutoControl.FindWindowHandle(null, "Garena - Game Center"); var child = AutoControl.FindHandle(hWnd, "Chrome_RenderWidgetHostHWND", null); var point = AutoControl.GetGlobalPoint(child, LOLlocation); int num = Convert.ToInt32(textBox1.Text); AutoControl.BringToFront(hWnd); AutoControl.MouseClick(point); Thread.Sleep(3000); autoItX3.MouseWheel("down", 2); Thread.Sleep(3000); //var postPoint = AutoControl.GetGlobalPoint(child, 147, 113);// 147 113 //AutoControl.MouseClick(postPoint); //Thread.Sleep(2000); int[] arrEndPoint = { 202, 315, 341, 358, 432, 471, 500, 570, 630 }; // for y for (int i = 0; i < 2; i++) { Point startpoint = new Point(951, 12); Point endPoint = new Point(952, 202); var fpoint = AutoControl.GetGlobalPoint(child, 150, 149); for (int j = 0; j < 3; j++) { AutoControl.MouseClick(fpoint); Thread.Sleep(3000); var spoint = AutoControl.GetGlobalPoint(child, startpoint); autoItX3.MouseMove(spoint.X, spoint.Y); autoItX3.MouseDown("LEFT"); Bitmap screen; for (int p = 0; p < arrEndPoint.Length; p++) { endPoint.Y = arrEndPoint[p]; var endP = AutoControl.GetGlobalPoint(child, endPoint); autoItX3.MouseMove(endP.X, endP.Y); screen = (Bitmap)CaptureHelper.CaptureScreen(); var subBit = ImageScanOpenCV.GetImage("commentSection.PNG"); var sendpost = ImageScanOpenCV.GetImage("SendComment.PNG"); var ComsecLocation = ImageScanOpenCV.FindOutPoint((Bitmap)screen, subBit); if (ComsecLocation != null) { autoItX3.MouseUp("LEFT"); AutoControl.MouseClick((Point)ComsecLocation); autoItX3.Send("Hello"); Thread.Sleep(1000); screen = (Bitmap)CaptureHelper.CaptureScreen(); var sendLocation = ImageScanOpenCV.FindOutPoint((Bitmap)screen, sendpost); Point sendlo = (Point)sendLocation; // can not find the right so find the near and add a few unit to right point sendlo.X += 3; sendlo.Y += 7; AutoControl.MouseClick((Point)sendlo); screen.Dispose(); break; } } var exitpost = AutoControl.GetGlobalPoint(child, 62, 6); exitpost.Y -= 37; AutoControl.MouseClick(exitpost); Thread.Sleep(2000); fpoint.X += 325; } Thread.Sleep(1000); Point zone = AutoControl.GetGlobalPoint(child, 20, 20); autoItX3.MouseMove(zone.X, zone.Y); autoItX3.MouseWheel("down", 4); Thread.Sleep(3000); } }
private void button1_Click(object sender, EventArgs e) { au3.MouseMove(0, 0, 10); }
public void Position(int x, int y) { auto.MouseMove(x, y); }
private void HighlightSession() { autoIt.MouseMove(500, 375); autoIt.Sleep(2000); autoIt.MouseClick("primary"); // Highlights the first session only }
public void mouseMove(Point location) { autoIT.MouseMove(location.X, location.Y); }