Purpose - the organization of cycles with the verification of the condition
CODE:
for (int a=0; a <5; a++)
{
messagebox ("loop");
}
{
messagebox ("loop");
}
An example of how to expect the appearance of an image on the screen in 5 seconds. If the image does not appear - exit the loop.
CODE:
for (int t=gettime (); gettime () - t <5000; sleep (20))
{
if (findimage (1, #Image [0] [0], 0, #PosX, #PosY, 0, 0, 1366, 768, -1) == 1)
{
messagebox ("found ...");
goto q;
}
}
messagebox ("not ...");
q:;
{
if (findimage (1, #Image [0] [0], 0, #PosX, #PosY, 0, 0, 1366, 768, -1) == 1)
{
messagebox ("found ...");
goto q;
}
}
messagebox ("not ...");
q:;