CODE:
win wind=window ("BlueStacks App Player", "WindowsForms10.Window.8.app.0.33c0d9d", -1);
int col, x, y;
getdisplay(col, x, y);
int Image_0[142][64];loadimage (#Image_0[0][0], "C:\Users\root\Documents\Image_0.bmp");
int PosX_0[1];int PosY_0[1];
int n=0;
b: if (findimage(1, #Image_0[0][0], 0, #PosX_0[0], #PosY_0[0], 0, 0,x, y, -1)==1);
{sleep(50); goto b;}
sendmouse (LEFT, PosX_0[n], PosY_0[n],wind);
pause (6500);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (22000);
//нанять 100 рыцарей
sendmouse (LEFT, 590, 616, wind);
pause (1856);
sendmouse (LEFT, 742, 547, wind);
pause (1856);
sendmousetransfer(LEFT, 272, 471, 271, 224, 0.00006, wind);
pause (1500);
sendmouse (LEFT, 275, 471, wind);
pause (1794);
sendmouse (LEFT, 804, 558, wind);
pause (1045);
sendmouse (LEFT, 610, 421, wind);
pause (749);
sendmouse (LEFT, 610, 514, wind);
pause (608);
sendmouse (LEFT, 610, 514, wind);
pause (437);
sendmouse (LEFT, 783, 521, wind);
pause (905);
sendmouse (LEFT, 1040, 37, wind);
pause (1000);
goto b;
int col, x, y;
getdisplay(col, x, y);
int Image_0[142][64];loadimage (#Image_0[0][0], "C:\Users\root\Documents\Image_0.bmp");
int PosX_0[1];int PosY_0[1];
int n=0;
b: if (findimage(1, #Image_0[0][0], 0, #PosX_0[0], #PosY_0[0], 0, 0,x, y, -1)==1);
{sleep(50); goto b;}
sendmouse (LEFT, PosX_0[n], PosY_0[n],wind);
pause (6500);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (4000);
sendmouse (LEFT, 697, 606, wind);
pause (100);
sendmouse (LEFT, 573, 608, wind);
pause (106);
sendmouse (LEFT, 459, 609, wind);
pause (121);
sendmouse (LEFT, 337, 612, wind);
pause (22000);
//нанять 100 рыцарей
sendmouse (LEFT, 590, 616, wind);
pause (1856);
sendmouse (LEFT, 742, 547, wind);
pause (1856);
sendmousetransfer(LEFT, 272, 471, 271, 224, 0.00006, wind);
pause (1500);
sendmouse (LEFT, 275, 471, wind);
pause (1794);
sendmouse (LEFT, 804, 558, wind);
pause (1045);
sendmouse (LEFT, 610, 421, wind);
pause (749);
sendmouse (LEFT, 610, 514, wind);
pause (608);
sendmouse (LEFT, 610, 514, wind);
pause (437);
sendmouse (LEFT, 783, 521, wind);
pause (905);
sendmouse (LEFT, 1040, 37, wind);
pause (1000);
goto b;
логика должна быть в следующем.
Если он находит изображение он на него кликает если не находит он ждет пока оно появится.
sendmouse (LEFT, PosX_0[n], PosY_0[n],wind);
Но он почему то пропускает эту строчку и тыкает на следующую а именно на
sendmouse (LEFT, 697, 606, wind); и тд
В чем ошибка??