private void buttonStart_Click(object sender, EventArgs e) { activate(); Point p = guessStartTest_AbortTestPos(); AutoItX.MouseClick("LEFT", p.X, p.Y, 1, 10); }
private void buttonRetry_Click(object sender, EventArgs e) { activate(); Point p = guessRetryPos(); AutoItX.MouseClick("LEFT", p.X, p.Y, 1, 10); }
private static void SetCursor(string control) { //1.Tìm tọa độ của cửa sổ chính WeChat, chiều dài và chiều rộng của cửa sổ Rectangle rg = AutoItX.WinGetPos("[CLASS:WeChatMainWndForPC]"); int locationX = rg.X; int locationY = rg.Y; int width = rg.Width; int height = rg.Height; if (control.Equals("SEARCHFRAME")) { //Xác định tọa độ vị trí của hộp tìm kiếm int searchX = locationX + (width / 6); int searchY = locationY + 30; //Di chuyển chuột đến hộp tìm kiếm, nhấp vào AutoItX.MouseClick("left", searchX, searchY); } if (control.Equals("MSGINPUT")) { //Xác định tọa độ vị trí của hộp tìm kiếm int MsgFrameX = locationX + (width * 2 / 3); int MsgFrameY = locationY + (height * 7 / 8); //Di chuyển chuột đến hộp tìm kiếm, nhấp vào AutoItX.MouseClick("left", MsgFrameX, MsgFrameY); } AutoItX.Sleep(500); }
/// <summary> /// Уточнение платежей /// </summary> /// <param name="pathjurnalerror">Путь к журналу ошибок</param> /// <param name="pathjurnalok">Путь к журналу Ок</param> /// <param name="logica">Логика анализа</param> public void Click10(string pathjurnalerror, string pathjurnalok, int logica) { WindowsAis3 win = new WindowsAis3(); RegxStart regxstart = new RegxStart(); while (true) { var fulltext = ReadWindow.Read.Reades.HidenTextReturn(WindowsAis3.AisNalog3); regxstart.Parse(fulltext); if (regxstart.IsNulable) { LibaryXMLAuto.ErrorJurnal.ErrorJurnal.JurnalError(pathjurnalerror, regxstart.RaschDoc, ModeBranchVedomost1, regxstart.Error); break; } AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + 45, win.WindowsAis.Y + 95); AutoItX.WinWait(Vedomost1Win.ViesneniePl[0], Vedomost1Win.ViesneniePl[1]); AutoItX.Send(ButtonConstant.Enter); regxstart.UseNalog(logica); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + 120, win.WindowsAis.Y + 80); AutoItX.WinWait(Vedomost1Win.Utoch[0], Vedomost1Win.Utoch[1]); AutoItX.Sleep(500); AutoItX.Send(ButtonConstant.Enter); AutoItX.WinWaitClose("АИС Налог-3 ПРОМ ", "Проведение уточнения"); AutoItX.Send(ButtonConstant.Tab); LibaryXMLAuto.ErrorJurnal.OkJurnal.JurnalOk(pathjurnalok, regxstart.RaschDoc + " Подставили КБК: " + regxstart.KbkIfns + " вместо " + regxstart.Kbk100, "Удалось спарсить"); AutoItX.Sleep(1000); break; } }
/// <summary> /// /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="moveWithoutDelayAfterClick"></param> /// <param name="numClicks"></param> /// <param name="button"></param> public void MouseClick( int x, int y, bool moveWithoutDelayAfterClick = true, int numClicks = 1, string button = "left") { var randDelley = new Random(); int randSpeed = new Random().Next(8, 12); MouseMove(x, y); Thread.Sleep(randDelley.Next(100, 250)); AutoItX.MouseClick(button, x, y, numClicks, randSpeed); Thread.Sleep(randDelley.Next(300, 600)); if (moveWithoutDelayAfterClick) { int randX = new Random().Next(327, 527); int randY = new Random().Next(500, 530); MouseMove(randX, randY); } else { Task.Run(() => { Thread.Sleep(3000); int randX = new Random().Next(327, 527); int randY = new Random().Next(500, 530); MouseMove(randX, randY); }); } }
private void UstawPrzegladanie() { int licznik = 0; if (AutoItX.WinActivate("EUKW - Prezentacja Księgi Wieczystej - Mozilla Firefox", "") == 1) { AutoItX.MouseMove(2210, 606); string tekst = ""; int kolumna = 606; while (tekst != @" Przeglądanie treści księgi wieczystej ") { kolumna += 20; AutoItX.MouseMove(2210, kolumna); AutoItX.MouseClick("LEFT", 2210, kolumna, 3); AutoItX.Send("^c"); licznik += 1; tekst = Clipboard.GetText(); if (licznik == 500) { throw new System.Exception("Za dlugo"); } } AutoItX.MouseMove(2210, kolumna + 70); } }
/// <summary> /// Само событие галочки на земле или имуществе /// Налоговое администрирование\ПОН ИЛ\1. ПОН ИЛ (ПЭ). Организации и физические лица, внесенные в ПОН ИЛ\2.01. ФЛ. Актуальное состояние /// </summary> public void Chekerfid() { WindowsAis3 win = new WindowsAis3(); win.ControlGetPos1(WindowsAis3.WinGrid[0], WindowsAis3.WinGrid[1], WindowsAis3.WinGrid[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 425, win.WindowsAis.Y + win.Y1 + 35); }
/// <summary> /// Само событие галочки на земле или имуществе /// </summary> public void QbeZemlyOnImushestvo() { WindowsAis3 win = new WindowsAis3(); win.ControlGetPos1(WindowsAis3.WinGrid[0], WindowsAis3.WinGrid[1], WindowsAis3.WinGrid[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 400, win.WindowsAis.Y + win.Y1 + 55); }
private void ChangeDownloadPath(string targetPath) { if (!Directory.Exists(targetPath)) { Directory.CreateDirectory(targetPath); } string currentPath = AutoItX.ControlGetText("[TITLE:Save As; CLASS:#32770]", "", "[CLASS:ToolbarWindow32; INSTANCE:4]"); if (!currentPath.Contains(targetPath)) { AutoItX.WinActivate("[TITLE:Save As; CLASS:#32770]", ""); IntPtr w = AutoItX.WinGetHandle("[TITLE:Save As; CLASS:#32770]", ""); IntPtr c = AutoItX.ControlGetHandle(w, "[CLASS:ToolbarWindow32; INSTANCE:4]"); Rectangle mainWindowPosition = AutoItX.WinGetPos(w); Rectangle refElementPosition = AutoItX.ControlGetPos(w, c); int startX = mainWindowPosition.X + refElementPosition.X + refElementPosition.Width - 10; int startY = mainWindowPosition.Y + refElementPosition.Y + refElementPosition.Height / 2; AutoItX.MouseMove(startX + 15, startY + 25); AutoItX.MouseClick("LEFT", startX + 15, startY + 25); AutoItX.Send("{BACKSPACE}"); AutoItX.AutoItSetOption("SendKeyDelay", GetRandomDelay(50)); AutoItX.Send(targetPath); Thread.Sleep(TimeSpan.FromSeconds(1)); AutoItX.Send("{ENTER}"); } }
/// <summary> /// Document checkin message click mark as complete /// </summary> public void DocumentCheckinMessgaeClickMarkAsComplete() { // Add Script for Checkin Msg // Process.Start(@"C:\Projects\AutoIT\AutoItX Scripts\CheckinScript.exe"); AutoItX.WinActivate("Mark as complete"); var winHandle = AutoItX.WinGetHandle("[REGEXPCLASS:(?i)HwndWrapper[ElementsDesktopClient.exe;;.*]]"); AutoItX.WinActivate(winHandle); AutoItX.ControlClick("Mark as complete", "", "TextBlock"); AutoItX.MouseClick("left", 1); AutoItX.MouseClick("left", 1); AutoItX.WinActivate("[REGEXPCLASS:(?i)HwndWrapper[ElementsDesktopClient.exe;;.*]]"); var winTitle = AutoItX.WinGetTitle("[REGEXPCLASS:(?i)HwndWrapper[ElementsDesktopClient.exe;;.*]]"); CommonMethods.PlayWait(3000); AutoItX.WinActivate(@"[X:1535\Y:842\W:356\H:188]"); //Click on the edc AutoItX.MouseClick(); //Select master as complete AutoItX.Send("{ENTER}"); //Move to the ok button AutoItX.Send("{TAB}"); AutoItX.Send("{TAB}"); AutoItX.Send("{TAB}"); //Click on ok button AutoItX.Send("{ENTER}"); AutoItX.MouseClick(); }
/// <summary> /// Первоначальная навигация для уточнение 100 "Расчеты с бюджетом" /// </summary> public void StartNavigate() { ControlGetPos1(JournalStatusBar[0], JournalStatusBar[1], JournalStatusBar[2]); AutoItX.MouseMove(WindowsAis.X + X1 + 40, WindowsAis.Y + Y1 + 15); ControlGetPos1(WindowsAis3.Journal[0], WindowsAis3.Journal[1], WindowsAis3.Journal[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, WindowsAis.X + X1 + 30, WindowsAis.Y + Y1 + 285, 2); }
/// <summary> /// Document Verification /// </summary> /// <param name="reportFormat"></param> /// <param name="reportName"></param> /// <param name="caseTitle"></param> /// <param name="registryEntryTile"></param> /// <param name="screenedRegistryTitleFull"></param> public void ReportVerification(string reportFormat, string reportName, string caseTitle, string registryEntryTile, string screenedRegistryTitleFull = "") { try { string clipboardTextPDF = string.Empty; Clipboard.Clear(); if (reportFormat == ReportFormat.PDF.GetStringValue() || reportFormat == ReportFormat.Text.GetStringValue() || reportFormat == ReportFormat.HTML.GetStringValue()) { var tabs = _driver.WindowHandles; _driver.SwitchTo().Window(tabs[1]); var databaseName = FrontPage.Elements.DatabaseName; AutoItX.WinActivate("Elements - " + databaseName + " - Google Chrome", ""); CommonMethods.PlayWait(5000); AutoItX.MouseClick(); AutoItX.Send("{ENTER}"); AutoItX.Send("^a"); AutoItX.Send("^c"); clipboardTextPDF = Clipboard.GetText(); } if (reportFormat == ReportFormat.Word.GetStringValue()) { } VerifyContents(reportFormat, reportName, caseTitle, registryEntryTile, screenedRegistryTitleFull, clipboardTextPDF); } catch (System.Exception ex) { var exception = ex; } }
private void ClickElement(int startX, int startY, int offsetX, int offsetY) { int elementPossitionX = startX + offsetX; int elementPossitionY = startY + offsetY; AutoItX.MouseClick("LEFT", elementPossitionX, elementPossitionY); Thread.Sleep(GetRandomDelay(100)); }
public void MouseClick(string button, int x, int y) { if (wait_time > 0) { AutoItX.Sleep(wait_time); } AutoItX.MouseClick(button, x, y); }
/// <summary> /// Завершение закрыть окна /// </summary> public void SendJournalClose() { WindowsAis3 win = new WindowsAis3(); AutoItX.Sleep(1000); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.WindowsAis.Width - 20, win.WindowsAis.Y + 160); AutoItX.Sleep(1000); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.WindowsAis.Width - 20, win.WindowsAis.Y + 160); }
/// <summary> /// Само событие галочки на Транспорте /// </summary> public void QbeTransport() { WindowsAis3 win = new WindowsAis3(); win.ControlGetPos1(WindowsAis3.WinGrid[0], WindowsAis3.WinGrid[1], WindowsAis3.WinGrid[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 450, win.WindowsAis.Y + win.Y1 + 55); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 450, win.WindowsAis.Y + win.Y1 + 300); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 450, win.WindowsAis.Y + win.Y1 + 320); }
private void ClickElement(int startX, int startY, int offsetX, int offsetY) { int elementPossitionX = startX + offsetX; int elementPossitionY = startY + offsetY; AutoItX.AutoItSetOption("SendKeyDelay", GetRandomDelay(100)); AutoItX.MouseClick("LEFT", elementPossitionX, elementPossitionY); AutoItX.Sleep(GetRandomDelay(1000)); }
static void Main(string[] args) { //pega a posição do mause int x = AutoItX.MouseGetPos().X; int y = AutoItX.MouseGetPos().Y; Console.WriteLine("x"); Console.WriteLine(x.ToString()); Console.WriteLine("y"); Console.WriteLine(y.ToString()); //move o mause AutoItX.MouseMove(540, 752, 3); AutoItX.MouseClick("LEFT", 540, 752, 1); AutoItX.ProcessWait(null, 10); //AutoItX.Sleep(30000); //clica no brauser AutoItX.MouseMove(843, 56, 3); AutoItX.MouseClick("LEFT", 843, 56, 1); Console.WriteLine("esperando"); //da uma pausa AutoItX.ProcessWait(null, 3); Console.WriteLine("feito"); AutoItX.MouseMove(689, 61, 3); AutoItX.MouseClick("LEFT", 689, 61, 1); AutoItX.Send("http://www.realsis.com.br/teste"); AutoItX.ProcessWait(null, 3); AutoItX.Send("{BACKSPACE}"); AutoItX.Send("{BACKSPACE}"); AutoItX.Send("{BACKSPACE}"); AutoItX.Send("{BACKSPACE}"); AutoItX.Send("{BACKSPACE}"); AutoItX.Send("{BACKSPACE}"); AutoItX.ProcessWait(null, 3); AutoItX.Send("{ENTER}"); AutoItX.ProcessWait(null, 7); //click do mouse AutoItX.MouseClick("LEFT", 689, 61, 1); //copiar AutoItX.Send("^c"); AutoItX.ProcessWait(null, 3); //botão do windows AutoItX.Send("{LWIN}"); AutoItX.ProcessWait(null, 2); AutoItX.Send("bloco"); AutoItX.ProcessWait(null, 2); AutoItX.Send("{ENTER}"); AutoItX.ProcessWait(null, 3); //colar AutoItX.Send("^v"); }
/// <summary> /// Закрыть подчиненные формы /// </summary> private void MouseCloseFormRsb(int countClose) { var win = new WindowsAis3(); while (countClose > 0) { AutoItX.Sleep(1000); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.WindowsAis.Width - 20, win.WindowsAis.Y + 160); countClose--; } }
/// <summary> /// Само событие простановки F /// </summary> /// <param name="str">Параметры состояние F через слеш /</param> public void SelectF(string str) { WindowsAis3 win = new WindowsAis3(); win.ControlGetPos1(WindowsAis3.WinGrid[0], WindowsAis3.WinGrid[1], WindowsAis3.WinGrid[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 70, win.WindowsAis.Y + win.Y1 + 35); AutoItX.ClipPut(str); AutoItX.Send(ButtonConstant.Down2); AutoItX.Send(ButtonConstant.Right5); AutoItX.Send(ButtonConstant.Enter); AutoItX.Send(ButtonConstant.CtrlV); AutoItX.Send(ButtonConstant.Enter); }
public void Save(string path, string filename) { AutoItX.MouseClick("LEFT", 20, 30, 1); //клик по "Файл" AutoItX.MouseClick("LEFT", 42, 213, 1); //клик по "Сохранить как" AutoItX.MouseClick("LEFT", 515, 80, 1); //клик по "Сохранить как PNG" AutoItX.Sleep(1000); AutoItX.WinWaitActive("Сохранение"); AutoItX.Send(filename); AutoItX.Sleep(1000); AutoItX.ControlClick("Сохранение", "", "ToolbarWindow324"); //выделение контрола пути AutoItX.Send(path + "{ENTER}"); //набор пути и клац о клавишу Enter AutoItX.ControlClick("Сохранение", "", "Button2"); //клик по кнопке "сохранить" AutoItX.WinWaitActive(filename); }
private static void GroupNameClick() { //1.Tìm tọa độ của cửa sổ chính WeChat, chiều dài và chiều rộng của cửa sổ Rectangle rg = AutoItX.WinGetPos("[CLASS:WeChatMainWndForPC]"); int locationX = rg.X; int locationY = rg.Y; int width = rg.Width; int height = rg.Height; //2.Xác định vị trí của nút gửi int GroupNameX = locationX + (width / 6); int GroupNameY = locationY + 100; AutoItX.MouseClick("left", GroupNameX, GroupNameY); }
public static void PickupAll() { int xMin = 450, xMax = 1450, yMin = 250, yMax = 700; int steps = 5; int move = (yMax - yMin) / steps; for (int i = 0; i < steps + 1; i++) { AutoItX.MouseClick("LEFT", xMin, yMin + move * i, 1, 15); AutoItX.Sleep(1000); AutoItX.MouseClick("LEFT", xMax, yMin + move * i, 1, 15); AutoItX.Sleep(1000); } }
private string sprawdzWynik() { AutoItX.MouseMove(2127, 329); AutoItX.MouseClick(); AutoItX.MouseClick(); AutoItX.MouseClick(); AutoItX.Send("^c"); AutoItX.MouseClick("RIGHT"); AutoItX.Sleep(500); AutoItX.MouseClick("LEFT"); string naglowek = Clipboard.GetText(); return(naglowek.TrimStart()); }
/// <summary> /// Атоматизация ветки /// Общие задания\Урегулирование задолженности\05.09 Ручное формирование решений на зачет/возврат/возврат процентов\05.09 Подпись проектов решений на зачет/возврат/возврат процентов\Подпись начальником аналитического отдела /// а также ветка /// Общие задания\Урегулирование задолженности\05.09.01(06.01) Формирование сообщения о факте излишней уплаты (излишнего взыскания)\05.09.01(06.01) Формирование сообщения об излишней уплате (взыскании)\05.09.01(06.01) Формирование решений о зачете по инициативе НО\Подпись начальником аналитического отдела /// </summary> public string Click6() { int i = 0; WindowsAis3 win = new WindowsAis3(); while (true) { win.ControlGetPos1(WindowsAis3.WinRequest[0], WindowsAis3.WinRequest[1], WindowsAis3.WinRequest[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 355, win.WindowsAis.Y + win.Y1 + 80); AutoItX.WinWait(WindowsAis3.AisNalog3, ZachetVozvrat.Nachalnic, 10); if (AutoItX.WinExists(WindowsAis3.AisNalog3, ZachetVozvrat.Nachalnic) == 1) { break; } if (i == Proverka.Controlnumer) { return(Status.StatusAis.Status6); } i++; } //Подписываем проверяем если Ок сохраняем var countdocstring = ReadWindow.Read.Reades.ReadFormNotActiv(Mode.Analitic.Task.TaskZn.Signature); while (true) { win.ControlGetPos1(WindowsAis3.WinRequest[0], WindowsAis3.WinRequest[1], WindowsAis3.WinRequest[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 550, win.WindowsAis.Y + win.Y1 + 75); var countdocstringcontrol = ReadWindow.Read.Reades.ReadFormNotActiv(Mode.Analitic.Task.TaskZn.Signature); if (!countdocstring.Equals(countdocstringcontrol)) { break; } } while (true) { win.ControlGetPos1(WindowsAis3.WinRequest[0], WindowsAis3.WinRequest[1], WindowsAis3.WinRequest[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, win.WindowsAis.X + win.X1 + 205, win.WindowsAis.Y + win.Y1 + 85); AutoItX.WinWait(ZachetVozvrat.TitleClose, ZachetVozvrat.TextWin, 10); if (AutoItX.WinExists(ZachetVozvrat.TitleClose, ZachetVozvrat.TextWin) == 1) { AutoItX.WinActivate(ZachetVozvrat.TitleClose); AutoItX.Send(ButtonConstant.Enter); AutoItX.WinWait(ZachetVozvrat.TitleExit, ZachetVozvrat.WorkOk, 10); AutoItX.Send(ButtonConstant.Enter); break; } } return(Status.StatusAis.Status3); }
private void CheckHP(int PlayerNum, int HPValue) { int settingVal = (int)((decimal)Properties.Settings.Default.PropertyValues["HealPlayer" + PlayerNum].PropertyValue); if (HPValue > settingVal) { return; } //AutoItX.MouseMove( 30, 30 + ( ( PlayerNum - 1 ) * 52 ), 3 ); AutoItX.MouseClick("left", 30, 30 + ((PlayerNum - 1) * 52), 2, 20); // 2 Clicks, Movespeed 20 AutoItX.Send("1", 1); // Mode 1 [raw], assume Heal on Slot 1 AddLog("healing Player " + PlayerNum + ", " + HPValue + "/" + settingVal + " HP"); }
private string sprawdzDzial() { AutoItX.MouseMove(2492, 241); AutoItX.MouseClick("LEFT", 2492, 241, 3); AutoItX.Send("^c"); AutoItX.Sleep(400); AutoItX.MouseClick("RIGHT"); AutoItX.Sleep(400); AutoItX.MouseClick("LEFT"); string naglowek = Clipboard.GetText(); return(naglowek); }
private static void SendClick() { //1.Tìm tọa độ của cửa sổ chính WeChat, chiều dài và chiều rộng của cửa sổ Rectangle rg = AutoItX.WinGetPos("[CLASS:WeChatMainWndForPC]"); int locationX = rg.X; int locationY = rg.Y; int width = rg.Width; int height = rg.Height; //2.Xác định vị trí của nút gửi int enterX = locationX + width - 60; int enterY = locationY + height - 30; AutoItX.MouseClick("left", enterX, enterY); AutoItX.Sleep(500); }
/// <summary> /// Выборка передача /// </summary> /// <param name="ifns">Номер инспекции</param> public void SendParametrsPeredahca(string ifns) { ControlGetPos1(WinGrid[0], WinGrid[1], WinGrid[2]); AutoItX.MouseClick(ButtonConstant.MouseLeft, WindowsAis.X + X1 + 40, WindowsAis.Y + Y1 + 35); AutoItX.Send(ButtonConstant.Right5); AutoItX.Send(ButtonConstant.Enter); AutoItX.Send("10"); AutoItX.Send(ButtonConstant.Enter); AutoItX.Send(ButtonConstant.Down16); AutoItX.Send(ButtonConstant.Enter); AutoItX.Send(ifns); AutoItX.Send(ButtonConstant.Enter); AutoItX.MouseClick(ButtonConstant.MouseLeft, WindowsAis.X + X1 + 1011, WindowsAis.Y + Y1 + 55); AutoItX.MouseClick(ButtonConstant.MouseLeft, WindowsAis.X + X1 + 1011, WindowsAis.Y + Y1 + 101); AutoItX.MouseClick(ButtonConstant.MouseLeft, WindowsAis.X + X1 + 1011, WindowsAis.Y + Y1 + 366); }
private static void Transfer() { var inputMainPanel = new IntPtr(); FillUpTransferForm(inputMainPanel); if (IsValidTransferForm()) { //SET TRANSFER PASSWORD var txtTransferpass = AutoItX.ControlGetHandle(_mainForm, "[CLASS:TCMBEdit]"); var txtTransferpassPosition = AutoItX.ControlGetPos(_mainForm, txtTransferpass); var elemementPositionX = _windowsPosition.X + txtTransferpassPosition.X; var elemementPositionY = _windowsPosition.Y + txtTransferpassPosition.Y; if (AutoItX.ControlFocus(_mainForm, txtTransferpass) != 1) { return; } Console.WriteLine("Focus on Transfer Password"); AutoItX.WinActivate(_mainForm); SimulateKey.SetForegroundWindow(txtTransferpass); Thread.Sleep(100); SimulateKey.ClearText(txtTransferpass); SimulateKey.SendText(txtTransferpass, Transferpassword); Console.WriteLine($"{Transferpassword}: Transfer Password Set"); Thread.Sleep(1000); Console.WriteLine("Confirm Transfer"); AutoItX.MouseClick("LEFT", elemementPositionX + 80, elemementPositionY + 80); Thread.Sleep(2000); if (ConfirmationMessageFindByClassName("TPbBaseMsgForm", new Tuple <int, int>(200, 180))) { Console.WriteLine("Confirmation Error On Transfer Transaction!"); } if (ConfirmationMessageFindByClassName("TErrorWithHelpForm", new Tuple <int, int>(200, 190))) { Console.WriteLine("Confirmation Error On Transfer Transaction!"); } } }