Всем привет! Ребята,помогите с Resource.
Сделал скрипт,создал exe запаковав в Resorse все ,укоротил пути, изображения перекинул в папку RESOURCE и указал в графическом редакторе на них все.
У меня на компе работает когда запускаю ехе ,даже когда переминовываю папку Resource.
CODE:int k,x(50),y(50),n=0;
int col_KIB, ex_KIB, ey_KIB, sum_KIB, x_KIB, y_KIB;
int Image_0_KIB[10][10];
int Image_1_KIB[14][18];
int Image_2_KIB[11][10];
int Image_3_KIB[12][12];
int Image_4_KIB[14][12];
int Image_5_KIB[28][28];
int Image_6_KIB[19][17];
int Image_7_KIB[22][15];
int Image_8_KIB[11][14];
int Image_9_KIB[16][17];
int Image_10_KIB[14][14];
start_();
m_KIB0: enablerealmouse(3, 10, 2, 2);
findimage_(#Image_0_KIB[0][0], 5000, 300, 200, 1, -30, -80, 300, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
start(0);
findimage_(#Image_0_KIB[0][0], 5000, 300, 200, 1, -30, -175, 300, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
start(0);
findimage_(#Image_0_KIB[0][0], 5000, 300, 200, 1, -30, -270, 300, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
start(0);
findimage_(#Image_0_KIB[0][0], 5000, 300, 200, 1, -30, -365, 300, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
start(0);
findimage_(#Image_0_KIB[0][0], 5000, 300, 200, 1, -30, -460, 300, -1, 10, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
start(0);
findimage_(#Image_1_KIB[0][0], 5000, 300, 1000, 1, 0, 0, 500, -1, 5, 75, 4, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
findimage_(#Image_3_KIB[0][0], 3000, 0, 0, 1, 5, 5, 500, -1, 10, 75, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
findimage_(#Image_2_KIB[0][0], 1000, 300, 0, 1, 7, 7, 300, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
findimage_(#Image_4_KIB[0][0], 1000, 200, 200, 1, 7, 7, 500, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB); goto m_KIB0;
function start_()
{
getdisplay(col_KIB, ex_KIB, ey_KIB);
load_image_();
pause(1000);
}
function mouse_(int p1, int m, int xm, int ym, int p2)
{
pause(p1);
if (m==1) mouse(LEFT, xm, ym);
if (m==2) mouse(MIDDLE, xm, ym);
if (m==3) mouse(RIGHT, xm, ym);
if (m==4) mousedown(LEFT, xm, ym);
if (m==5) mousedown(MIDDLE, xm, ym);
if (m==6) mousedown(RIGHT, xm, ym);
if (m==7) mouseup(LEFT, xm, ym);
if (m==8) mouseup(MIDDLE, xm, ym);
if (m==9) mouseup(RIGHT, xm, ym);
if (m==10) mousemove(xm, ym);
pause(p2);
}
function findimage_(int #Image, int t, int p1, int p2, int m, int xm, int ym, int p3, int fon, int r, int p, int k, int xs, int ys, int xf, int yf, int#sum, int#x, int#y)
{
int timKIB, sumKIB, xKIB, yKIB;
pause(p1);
sumKIB=0;
if (t!=1) timKIB=gettime();
a: if (r==0 && p==100){sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, -1); if (sum>0) goto e;}
else {sum=findimage(k, #Image[0][0], fon, #x[0], #y[0], xs, ys, xf, yf, r, r, r, r, r, r, p, 1, -1); if (sum>0) goto e;}
if (t==0) return 0;
if (gettime()-timKIB<t){sleep(20); goto a;}
return 0;
e: sumKIB=sum; xKIB=x[0]; yKIB=y[0];
pause(p2);
if (m==1){mouse(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==2){mouse(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==3){mouse(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==4){mousedown(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==5){mousedown(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==6){mousedown(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==7){mouseup(LEFT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==8){mouseup(MIDDLE, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==9){mouseup(RIGHT, xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
if (m==10){mousemove(xs+xKIB+xm, ys+yKIB+ym); pause(p3);}
return sumKIB;
}
function load_image_()
{
string temp_fold=tempfolder();
unpack("C:\RESOURCE\na1.bmp", temp_fold+"na1.bmp", 1);
loadimage (#Image_0_KIB[0][0], temp_fold+"na1.bmp"Подмигивание;
unpack("C:\RESOURCE\gor.bmp", temp_fold+"gor.bmp", 1);
loadimage (#Image_1_KIB[0][0], temp_fold+"gor.bmp"Подмигивание;
unpack("C:\RESOURCE\zabr.bmp", temp_fold+"zabr.bmp", 1);
loadimage (#Image_2_KIB[0][0], temp_fold+"zabr.bmp"Подмигивание;
unpack("C:\RESOURCE\magaz.bmp", temp_fold+"magaz.bmp", 1);
loadimage (#Image_3_KIB[0][0], temp_fold+"magaz.bmp"Подмигивание;
unpack("C:\RESOURCE\podz.bmp", temp_fold+"podz.bmp", 1);
loadimage (#Image_4_KIB[0][0], temp_fold+"podz.bmp"Подмигивание;
unpack("C:\RESOURCE\nA4AT2.bmp", temp_fold+"nA4AT2.bmp", 1);
loadimage (#Image_5_KIB[0][0], temp_fold+"nA4AT2.bmp"Подмигивание;
unpack("C:\RESOURCE\na4 boi.bmp", temp_fold+"na4 boi.bmp", 1);
loadimage (#Image_6_KIB[0][0], temp_fold+"na4 boi.bmp"Подмигивание;
unpack("C:\RESOURCE\prod.bmp", temp_fold+"prod.bmp", 1);
loadimage (#Image_7_KIB[0][0], temp_fold+"prod.bmp"Подмигивание;
unpack("C:\RESOURCE\sun1.bmp", temp_fold+"sun1.bmp", 1);
loadimage (#Image_8_KIB[0][0], temp_fold+"sun1.bmp"Подмигивание;
unpack("C:\RESOURCE\sun2.bmp", temp_fold+"sun2.bmp", 1);
loadimage (#Image_9_KIB[0][0], temp_fold+"sun2.bmp"Подмигивание;
unpack("C:\RESOURCE\zakr.bmp", temp_fold+"zakr.bmp", 1);
loadimage (#Image_10_KIB[0][0], temp_fold+"zakr.bmp"Подмигивание;
}
function start()
{
findimage_(#Image_5_KIB[0][0], 2000, 0, 200, 1, 5, 5, 200, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
findimage_(#Image_6_KIB[0][0], 1000, 0, 0, 1, 5, 5, 500, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
mouse_(0, 1, 783, 734, 0);
findimage_(#Image_7_KIB[0][0], 1000, 100, 100, 1, 0, 0, 200, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
m_KIB5: findimage_(#Image_8_KIB[0][0], 15000, 300, 100, 1, 0, -50, 100, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
findimage_(#Image_9_KIB[0][0], 10000, 100, 100, 1, 0, -50, 100, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB);
if (findimage_(#Image_10_KIB[0][0], 10000, 100, 100, 1, 0, 0, 500, -1, 0, 100, 1, 0, 0, ex_KIB, ey_KIB, #sum_KIB, #x_KIB, #y_KIB)>0) goto exit_KIB;
else goto m_KIB5;
exit_KIB:;
}
RESOURCE
{
"C:\RESOURCE\na1.bmp";
"C:\RESOURCE\gor.bmp";
"C:\RESOURCE\zabr.bmp";
"C:\RESOURCE\magaz.bmp";
"C:\RESOURCE\podz.bmp";
"C:\RESOURCE\nA4AT2.bmp";
"C:\RESOURCE\na4 boi.bmp";
"C:\RESOURCE\prod.bmp";
"C:\RESOURCE\sun1.bmp";
"C:\RESOURCE\sun2.bmp";
"C:\RESOURCE\zakr.bmp";
}