CODE:
int flag = 0;
while (flag == 0)
{
FM();
sleep(999);
//messagebox("WAITING . . .");
}
mousemove (F1x,F1y); // NOT WORK !!! :(
// END
function FM()
{
sleep (999);
int color;
int Rm = 20; // R minus from RGB original image
int Rp = 20; // R plus from RGB original image
int Gm = 20; // G minus from RGB original image
int Gp = 20; // G plus from RGB original image
int Bm = 20; // B minus from RGB original image
int Bp = 20; // B plus from RGB original image
int OriP =60; //Procent from original image
int xs = 0; // for imagefind X-start coord
int ys = 0; // for imagedind Y-start coord
int xf; // for imagefind X-finish coord from getdisplay function
int yf; // for imagefind Y-finish coord from getdisplay function
getdisplay (color , xf,yf);
int xFM[1];
int yFM[1];
int imageFM[50][50];// image size 25*25 px
loadimage(#imageFM[0][0] , "D:/mk.bmp");
//mousemove (xs,ys);
//sleep (999);
//mousemove (xf,yf);
//sleep (999);
findimage(1, #imageFM[0][0], -1, #xFM[0], #yFM[0], xs, ys, xf, yf,Rm,Rp,Gm,Gp,Bm,Bp,OriP,-1,-1);
mousemove (xFM[0],yFM[0]); // left corner of image
sleep (999);
int F1x;
int F1y;
F1x = xFM[0]+12;
F1y = yFM[0]+180;
//mousemove (F1x,F1y); // working in function
if (xFM[0]>0)
{
flag = 1;
}
else
{
flag = 0;
}
return flag;
return F1x;
return F1y;
}
int flag = 0;
while (flag == 0)
{
FM();
sleep(999);
//messagebox("WAITING . . .");
}
mousemove (F1x,F1y); // NOT WORK !!! :(
// END
function FM()
{
sleep (999);
int color;
int Rm = 20; // R minus from RGB original image
int Rp = 20; // R plus from RGB original image
int Gm = 20; // G minus from RGB original image
int Gp = 20; // G plus from RGB original image
int Bm = 20; // B minus from RGB original image
int Bp = 20; // B plus from RGB original image
int OriP =60; //Procent from original image
int xs = 0; // for imagefind X-start coord
int ys = 0; // for imagedind Y-start coord
int xf; // for imagefind X-finish coord from getdisplay function
int yf; // for imagefind Y-finish coord from getdisplay function
getdisplay (color , xf,yf);
int xFM[1];
int yFM[1];
int imageFM[50][50];// image size 25*25 px
loadimage(#imageFM[0][0] , "D:/mk.bmp");
//mousemove (xs,ys);
//sleep (999);
//mousemove (xf,yf);
//sleep (999);
findimage(1, #imageFM[0][0], -1, #xFM[0], #yFM[0], xs, ys, xf, yf,Rm,Rp,Gm,Gp,Bm,Bp,OriP,-1,-1);
mousemove (xFM[0],yFM[0]); // left corner of image
sleep (999);
int F1x;
int F1y;
F1x = xFM[0]+12;
F1y = yFM[0]+180;
//mousemove (F1x,F1y); // working in function
if (xFM[0]>0)
{
flag = 1;
}
else
{
flag = 0;
}
return flag;
return F1x;
return F1y;
}
Не двигает мышку по координатам.