Сделан в Кибор.
Скачать Macro
Нажмите для увеличения
Как использовать :
Синтаксис макросов:
M(680,84,5) - клик левой кнопкой мыши в координатах x 680 y 84 с рандомом +- 5 пикселей. Клик идет в оконных либо клиентских координатах как указано в настройках выпадающего списка. Смотри рис ниже. Если стоит галочка Background mode клик идет в фоновом режиме в привязанное окно. Мышь остается в пользование юзера.
K(a) - Нажатие кнопки A. Если стоит галочка Background mode нажатие идет в фоновом режиме в привязанное окно.
P(1000-2000) - пауза 1 - 2 сек.
Выпадающий список позволяет выбрать систему координат - оконный (все приложение) или клиентский (к примеру флеш в браузере). В зависимости от позиции списка показаны координаты которые использовать в кликах.
Во время запуска надо расположить программу так что бы кнопка была над программой или клиентской областью программы в которой будет использоваться макрос (к примеру над флешем).
Так как в момент нажатия на кнопку пуск будет привязка к области (окну) над которым находится мышь.
Нажмите для увеличения
Скрипт программы для Кибор
CODE:
win w;
int pos_size_button0[1][4], flag_button0[1], pos_size_edit0[7][4], pos_size_check0[7][4], flag_check0[7], pos_size_static0[3][4], pos_size_combo0[1][4], strok_combo0[1] , flag_combo0[1];
string text_button0[1], text_edit0[7], text_check0[7], text_static0[3], text_combo0[1][2];
int pos_size_button1[1][4], flag_button1[1];
string text_button1[1];
int col, ex, ey;
int ex5, ey5;
int start_=0;
string ot;
int n;
string Tip0[50];
int X0[50], Y0[50], R0_0[50], R0_1[50];
string K0[50];
int n_m0[50];
int kml0=0;
string Tip1[50];
int X1[50], Y1[50], R1_0[50], R1_1[50];
string K1[50];
int n_m1[50];
int kml1=0;
int r1, r2;
int k1, k2;
char tc;
dialog();
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
getmouse(ex5, ey5, w);
text_edit0[5]=format(ex5);
text_edit0[6]=format(ey5);
sleep(200);
if (read_config()==0)
{
text_edit0[2]="A"; text_edit0[3]="X";
write_config();
}
strcpy(#tc, text_edit0[2]);
k1= formatci(tc);
if (k1>90)k1=k1-32;
strcpy(#tc, text_edit0[3]);
k2= formatci(tc);
if (k2>90)k2=k2-32;
enabletimer(0);
lop:
if (start_==1)macros();
sleep(10);
goto lop;
function read_config()
{
if (fopen (pathfolder()+"config.txt", "r")!=0)
{
freadline(text_edit0[0]);
freadline(text_edit0[1]);
fread(flag_check0[0]);
fread(flag_check0[1]);
fread(flag_check0[2]);
fread(flag_check0[3]);
fread(flag_check0[4]);
fread(flag_check0[5]);
fread(flag_check0[6]);
freadline(text_edit0[2]);
freadline(text_edit0[3]);
fread(flag_combo0[0]);
fclose();
if (text_edit0[0]==" ")text_edit0[0]="";
if (text_edit0[1]==" " )text_edit0[1]="";
return 1;
}
return 0;
}
function write_config()
{
if (fopen (pathfolder()+"config.txt", "w")!=0)
{
if (text_edit0[0]=="")text_edit0[0]=" ";
if (text_edit0[1]=="")text_edit0[1]=" ";
if (text_edit0[2]=="")text_edit0[2]="A";
if (text_edit0[3]=="")text_edit0[3]="X";
fwrite(text_edit0[0]);fwrite(ENDL);
fwrite(text_edit0[1]);fwrite(ENDL);
fwrite(flag_check0[0]);fwrite(ENDL);
fwrite(flag_check0[1]);fwrite(ENDL);
fwrite(flag_check0[2]);fwrite(ENDL);
fwrite(flag_check0[3]);fwrite(ENDL);
fwrite(flag_check0[4]);fwrite(ENDL);
fwrite(flag_check0[5]);fwrite(ENDL);
fwrite(flag_check0[6]);fwrite(ENDL);
fwrite(text_edit0[2]);fwrite(ENDL);
fwrite(text_edit0[3]);fwrite(ENDL);
fwrite(flag_combo0[0]);fwrite(ENDL);
if (text_edit0[0]==" ")text_edit0[0]="";
if (text_edit0[1]==" " )text_edit0[1]="";
fclose();
}
}
function macros()
{
if (flag_check0[0]==1)
{
if (flag_check0[2]==1 && getkeystate(17)==0) goto d;
if (flag_check0[3]==1 && getkeystate(16)==0) goto d;
if (getkeystate(k1)==0) goto d;
for (n=0; n< kml0 ; n++)
{
if (Tip0[n]=="M")
{
if (R0_0[n]==0)r1=0;
else r1=rand(-R0_0[n], R0_0[n]);
if (flag_check0[6]==0){mousemove(X0[n]+r1, Y0[n]+r1, w); sleep(20); mouse(LEFT, X0[n]+r1, Y0[n]+r1, 1, w);}
else{sendmousemove(X0[n]+r1, Y0[n]+r1, w); sleep(20); sendmouse(LEFT, X0[n]+r1, Y0[n]+r1, w);}
}
//////
if (Tip0[n]=="P")
{
if (R0_0[n]==R0_1[n])r1=0;
else r1=rand(R0_0[n], R0_1[n]);
pause(r1);
}
/////////
if (Tip0[n]=="K")
{
if (flag_check0[6]==0)key(K0[ n], 1, 1, w);
else sendkey(K0[n], w);
}
}
a: if ((flag_check0[2]==1 && getkeystate(17)==1) && (flag_check0[3]==1 && getkeystate(16)==1) && getkeystate(k1)==1)
{sleep(10); goto a;}
}
d:;
if (flag_check0[1]==1)
{
if (flag_check0[4]==1 && getkeystate(17)==0) goto d1;
if (flag_check0[5]==1 && getkeystate(16)==0) goto d1;
if (getkeystate(k2)==0) goto d1;
for (n=0; n< kml1 ; n++)
{
if (Tip1[n]=="M")
{
if (R1_0[n]==0)r1=0;
else r1=rand(-R1_0[n], R1_0[n]);
if (flag_check0[6]==0){mousemove(X1[n]+r1, Y1[n]+r1, w); sleep(20); mouse(LEFT, X1[n]+r1, Y1[n]+r1, 1, w);}
else{sendmousemove(X1[n]+r1, Y1[n]+r1, w); sleep(20); sendmouse(LEFT, X1[n]+r1, Y1[n]+r1, w);}
}
//////
if (Tip1[n]=="P")
{
if (R1_0[n]==R1_1[n])r1=0;
else r1=rand(R1_0[n], R1_1[n]);
pause(r1);
}
/////////
if (Tip1[n]=="K")
{
if (flag_check0[6]==0)key(K1[n], 1, 1, w);
else sendkey(K1[n], w);
}
}
a1: if ((flag_check0[4]==1 && getkeystate(17)==1) && (flag_check0[5]==1 && getkeystate(16)==1) && getkeystate(k2)==1)
{sleep(10); goto a1;}
}
d1:;
}
function Load_Macro(string macro, int p)
{
int siz;
char temp[500];
string Stemp;
string slov_makros[100];
strcpy(#temp[0], macro);
siz=size(#temp[0]);
Stemp="";
int kl=0;
for (n=0; n<=siz; n++)
{
if (temp[n]==' ' || temp[n]==formatic(44) || temp[n]==formatic(40) || temp[n]==formatic(41) || temp[n]=='-' || n==siz)
{
if (n<=siz)
{
if (temp[n+1]==' ' || temp[n+1]==formatic(44) || temp[n+1]==formatic(40) || temp[n+1]==formatic(41) || temp[n+1]=='-' || n==siz)goto oioio;
}
slov_makros[kl]=Stemp;
Stemp="";
kl++;
oioio:;
}
else
{
if (temp[n]!=' ' && temp[n]!=formatic(44) && temp[n]!=formatic(40) && temp[n]!=formatic(41) && temp[n]!='-' && n!=siz)Stemp=Stemp+temp[n];
}
}
if (flag_check0[0]==1 && p==1)
{
if (macro=="")return "Macro missing";
kml0=0;
for (n=0; n<kl; n++)
{
if (slov_makros[n]=="M" || slov_makros[n]=="m")
{
Tip0[kml0]="M";
n_m0[kml0]=n;
n++;if (n==kl)return "M";
X0[kml0]=formatsn(slov_makros[n]);
if (X0[kml0]==-10011001)return "M";
n++;if (n==kl)return "M";
Y0[kml0]=formatsn(slov_makros[n]);
if (Y0[kml0]==-10011001)return "M";
n++;if (n==kl)return "M";
R0_0[kml0]=formatsn(slov_makros[n]);
if (R0_0[kml0]==-10011001)return "M";
n++;
kml0++;
}
if (slov_makros[n]=="P" || slov_makros[n]=="p")
{
Tip0[kml0]="P";
n_m0[kml0]=n;
n++;if (n==kl)return "P";
R0_0[kml0]=formatsn(slov_makros[n]);
if (R0_0[kml0]==-10011001)return "P";
n++;if (n==kl)return "P";
R0_1[kml0]=formatsn(slov_makros[n]);
if (R0_1[kml0]==-10011001)return "P";
n++;
kml0++;
}
if (slov_makros[n]=="K" || slov_makros[n]=="k")
{
Tip0[kml0]="K";
n_m0[kml0]=n;
n++;if (n==kl)return "K";
K0[kml0]=slov_makros[n];
n++;
kml0++;
}
}
}
///////////////////////////
if (flag_check0[1]==1 && p==2)
{
if (macro=="")return "Macro missing";
kml1=0;
for (n=0; n<kl; n++)
{
if (slov_makros[n]=="M" || slov_makros[n]=="m")
{
Tip1[kml1]="M";
n_m1[kml1]=n;
n++;if (n==kl)return "M";
X1[kml1]=formatsn(slov_makros[n]);
if (X1[kml1]==-10011001)return "M";
n++;if (n==kl)return "M";
Y1[kml1]=formatsn(slov_makros[n]);
if (Y1[kml1]==-10011001)return "M";
n++;if (n==kl)return "M";
R1_0[kml1]=formatsn(slov_makros[n]);
if (R1_0[kml1]==-10011001)return "M";
n++;
kml1++;
}
if (slov_makros[n]=="P" || slov_makros[n]=="p")
{
Tip1[kml1]="P";
n_m1[kml1]=n;
n++;if (n==kl)return "P";
R1_0[kml1]=formatsn(slov_makros[n]);
if (R1_0[kml1]==-10011001)return "P";
n++;if (n==kl)return "P";
R1_1[kml1]=formatsn(slov_makros[n]);
if (R1_1[kml1]==-10011001)return "P";
n++;
kml1++;
}
if (slov_makros[n]=="K" || slov_makros[n]=="k")
{
Tip1[kml1]="K";
n_m1[kml1]=n;
n++;if (n==kl)return "K";
K1[kml1]=slov_makros[n];
n++;
kml1++;
}
}
}
return "yes";
}
function dialog()
{
getdisplay(col, ex, ey);
//////////////////////
pos_size_button0[0][0]=610; pos_size_button0[0][1]=85; pos_size_button0[0][2]=157; pos_size_button0[0][3]=20;
text_button0[0]="Start - Click on the Client";
//////////
pos_size_edit0[0][0]=77; pos_size_edit0[0][1]=25; pos_size_edit0[0][2]=514; pos_size_edit0[0][3]=20;
pos_size_edit0[1][0]=77; pos_size_edit0[1][1]=55; pos_size_edit0[1][2]=514; pos_size_edit0[1][3]=20;
pos_size_edit0[2][0]=719; pos_size_edit0[2][1]=25; pos_size_edit0[2][2]=48; pos_size_edit0[2][3]=20;
pos_size_edit0[3][0]=719; pos_size_edit0[3][1]=55; pos_size_edit0[3][2]=48; pos_size_edit0[3][3]=20;
pos_size_edit0[4][0]=7; pos_size_edit0[4][1]=85; pos_size_edit0[4][2]=245; pos_size_edit0[4][3]=20;
pos_size_edit0[5][0]=265; pos_size_edit0[5][1]=85; pos_size_edit0[5][2]=32; pos_size_edit0[5][3]=20;
pos_size_edit0[6][0]=300; pos_size_edit0[6][1]=85; pos_size_edit0[6][2]=32; pos_size_edit0[6][3]=20;
text_edit0[0]=""; text_edit0[1]=""; text_edit0[2]=""; text_edit0[3]=""; text_edit0[4]="HELP - http:/"+"/kibor-bot.com/forum/topic.php?forum=6&topic=34"; text_edit0[5]=""; text_edit0[6]="";
//////////
pos_size_check0[0][0]=8; pos_size_check0[0][1]=25; pos_size_check0[0][2]=60; pos_size_check0[0][3]=20;
pos_size_check0[1][0]=8; pos_size_check0[1][1]=56; pos_size_check0[1][2]=60; pos_size_check0[1][3]=20;
pos_size_check0[2][0]=610; pos_size_check0[2][1]=25; pos_size_check0[2][2]=55; pos_size_check0[2][3]=20;
pos_size_check0[3][0]=670; pos_size_check0[3][1]=25; pos_size_check0[3][2]=42; pos_size_check0[3][3]=20;
pos_size_check0[4][0]=611; pos_size_check0[4][1]=56; pos_size_check0[4][2]=55; pos_size_check0[4][3]=20;
pos_size_check0[5][0]=671; pos_size_check0[5][1]=55; pos_size_check0[5][2]=42; pos_size_check0[5][3]=20;
pos_size_check0[6][0]=485; pos_size_check0[6][1]=87; pos_size_check0[6][2]=105; pos_size_check0[6][3]=20;
text_check0[0]="Macro 1"; text_check0[1]="Macro 2"; text_check0[2]="Control"; text_check0[3]="Shift"; text_check0[4]="Control"; text_check0[5]="Shift"; text_check0[6]="Background mode";
flag_check0[0]=0; flag_check0[1]=0; flag_check0[2]=0; flag_check0[3]=0; flag_check0[4]=0; flag_check0[5]=0; flag_check0[6]=0;
//////////
pos_size_static0[0][0]=7; pos_size_static0[0][1]=6; pos_size_static0[0][2]=51; pos_size_static0[0][3]=14;
pos_size_static0[1][0]=77; pos_size_static0[1][1]=6; pos_size_static0[1][2]=100; pos_size_static0[1][3]=14;
pos_size_static0[2][0]=608; pos_size_static0[2][1]=7; pos_size_static0[2][2]=100; pos_size_static0[2][3]=17;
text_static0[0]="№ Macro"; text_static0[1]="Macro"; text_static0[2]="Start Macro";
//////////
pos_size_combo0[0][0]=347; pos_size_combo0[0][1]=84; pos_size_combo0[0][2]=125; pos_size_combo0[0][3]=80;
strok_combo0[0]=2;
text_combo0[0][0]="Window area"; text_combo0[0][1]="Client area";
flag_combo0[0]=1;
//////////
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
EDIT, #pos_size_edit0[0][0], #text_edit0[0] |
CHECK, #pos_size_check0[0][0], #text_check0[0], #flag_check0[0] |
COMBO, #pos_size_combo0[0][0], #text_combo0[0][0], #strok_combo0[0], #flag_combo0[0] |
STATIC, #pos_size_static0[0][0], #text_static0[0]);
//////////
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
/////////////////////////////////////////
pos_size_button1[0][0]=3; pos_size_button1[0][1]=3; pos_size_button1[0][2]=120; pos_size_button1[0][3]=20;
text_button1[0]="Stop";
//////////
createdialog(1, BUTTON, #pos_size_button1[0][0], #text_button1[0], #flag_button1[0]);
//////////
}
CREATE_TIMER(0, 100)
{
if (start_==0)
{
if (flag_button0[0]>0)
{
flag_button0[0]=0;
ot=Load_Macro(text_edit0[0], 1);
if (ot!="yes")
{
hidedialog(0);
messagebox ("Error macro 1 : "+ot);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
goto pr;
}
ot=Load_Macro(text_edit0[1], 2);
if (ot!="yes")
{
hidedialog(0);
messagebox ("Error macro 2 : "+ot);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
goto pr;
}
hidedialog(0);
showdialog(1, "Macro", ex-170, ey-100, 132, 55, 1, 1);
sleep(500);
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
write_config();
start_=1;
goto pr;
}
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
getmouse(ex5, ey5, w);
text_edit0[5]=format(ex5);
text_edit0[6]=format(ey5);
pr:;
}
else
{
if (flag_button1[0]>0)
{
flag_button1[0]=0;
start_=0;
hidedialog(1);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
}
}
}
int pos_size_button0[1][4], flag_button0[1], pos_size_edit0[7][4], pos_size_check0[7][4], flag_check0[7], pos_size_static0[3][4], pos_size_combo0[1][4], strok_combo0[1] , flag_combo0[1];
string text_button0[1], text_edit0[7], text_check0[7], text_static0[3], text_combo0[1][2];
int pos_size_button1[1][4], flag_button1[1];
string text_button1[1];
int col, ex, ey;
int ex5, ey5;
int start_=0;
string ot;
int n;
string Tip0[50];
int X0[50], Y0[50], R0_0[50], R0_1[50];
string K0[50];
int n_m0[50];
int kml0=0;
string Tip1[50];
int X1[50], Y1[50], R1_0[50], R1_1[50];
string K1[50];
int n_m1[50];
int kml1=0;
int r1, r2;
int k1, k2;
char tc;
dialog();
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
getmouse(ex5, ey5, w);
text_edit0[5]=format(ex5);
text_edit0[6]=format(ey5);
sleep(200);
if (read_config()==0)
{
text_edit0[2]="A"; text_edit0[3]="X";
write_config();
}
strcpy(#tc, text_edit0[2]);
k1= formatci(tc);
if (k1>90)k1=k1-32;
strcpy(#tc, text_edit0[3]);
k2= formatci(tc);
if (k2>90)k2=k2-32;
enabletimer(0);
lop:
if (start_==1)macros();
sleep(10);
goto lop;
function read_config()
{
if (fopen (pathfolder()+"config.txt", "r")!=0)
{
freadline(text_edit0[0]);
freadline(text_edit0[1]);
fread(flag_check0[0]);
fread(flag_check0[1]);
fread(flag_check0[2]);
fread(flag_check0[3]);
fread(flag_check0[4]);
fread(flag_check0[5]);
fread(flag_check0[6]);
freadline(text_edit0[2]);
freadline(text_edit0[3]);
fread(flag_combo0[0]);
fclose();
if (text_edit0[0]==" ")text_edit0[0]="";
if (text_edit0[1]==" " )text_edit0[1]="";
return 1;
}
return 0;
}
function write_config()
{
if (fopen (pathfolder()+"config.txt", "w")!=0)
{
if (text_edit0[0]=="")text_edit0[0]=" ";
if (text_edit0[1]=="")text_edit0[1]=" ";
if (text_edit0[2]=="")text_edit0[2]="A";
if (text_edit0[3]=="")text_edit0[3]="X";
fwrite(text_edit0[0]);fwrite(ENDL);
fwrite(text_edit0[1]);fwrite(ENDL);
fwrite(flag_check0[0]);fwrite(ENDL);
fwrite(flag_check0[1]);fwrite(ENDL);
fwrite(flag_check0[2]);fwrite(ENDL);
fwrite(flag_check0[3]);fwrite(ENDL);
fwrite(flag_check0[4]);fwrite(ENDL);
fwrite(flag_check0[5]);fwrite(ENDL);
fwrite(flag_check0[6]);fwrite(ENDL);
fwrite(text_edit0[2]);fwrite(ENDL);
fwrite(text_edit0[3]);fwrite(ENDL);
fwrite(flag_combo0[0]);fwrite(ENDL);
if (text_edit0[0]==" ")text_edit0[0]="";
if (text_edit0[1]==" " )text_edit0[1]="";
fclose();
}
}
function macros()
{
if (flag_check0[0]==1)
{
if (flag_check0[2]==1 && getkeystate(17)==0) goto d;
if (flag_check0[3]==1 && getkeystate(16)==0) goto d;
if (getkeystate(k1)==0) goto d;
for (n=0; n< kml0 ; n++)
{
if (Tip0[n]=="M")
{
if (R0_0[n]==0)r1=0;
else r1=rand(-R0_0[n], R0_0[n]);
if (flag_check0[6]==0){mousemove(X0[n]+r1, Y0[n]+r1, w); sleep(20); mouse(LEFT, X0[n]+r1, Y0[n]+r1, 1, w);}
else{sendmousemove(X0[n]+r1, Y0[n]+r1, w); sleep(20); sendmouse(LEFT, X0[n]+r1, Y0[n]+r1, w);}
}
//////
if (Tip0[n]=="P")
{
if (R0_0[n]==R0_1[n])r1=0;
else r1=rand(R0_0[n], R0_1[n]);
pause(r1);
}
/////////
if (Tip0[n]=="K")
{
if (flag_check0[6]==0)key(K0[ n], 1, 1, w);
else sendkey(K0[n], w);
}
}
a: if ((flag_check0[2]==1 && getkeystate(17)==1) && (flag_check0[3]==1 && getkeystate(16)==1) && getkeystate(k1)==1)
{sleep(10); goto a;}
}
d:;
if (flag_check0[1]==1)
{
if (flag_check0[4]==1 && getkeystate(17)==0) goto d1;
if (flag_check0[5]==1 && getkeystate(16)==0) goto d1;
if (getkeystate(k2)==0) goto d1;
for (n=0; n< kml1 ; n++)
{
if (Tip1[n]=="M")
{
if (R1_0[n]==0)r1=0;
else r1=rand(-R1_0[n], R1_0[n]);
if (flag_check0[6]==0){mousemove(X1[n]+r1, Y1[n]+r1, w); sleep(20); mouse(LEFT, X1[n]+r1, Y1[n]+r1, 1, w);}
else{sendmousemove(X1[n]+r1, Y1[n]+r1, w); sleep(20); sendmouse(LEFT, X1[n]+r1, Y1[n]+r1, w);}
}
//////
if (Tip1[n]=="P")
{
if (R1_0[n]==R1_1[n])r1=0;
else r1=rand(R1_0[n], R1_1[n]);
pause(r1);
}
/////////
if (Tip1[n]=="K")
{
if (flag_check0[6]==0)key(K1[n], 1, 1, w);
else sendkey(K1[n], w);
}
}
a1: if ((flag_check0[4]==1 && getkeystate(17)==1) && (flag_check0[5]==1 && getkeystate(16)==1) && getkeystate(k2)==1)
{sleep(10); goto a1;}
}
d1:;
}
function Load_Macro(string macro, int p)
{
int siz;
char temp[500];
string Stemp;
string slov_makros[100];
strcpy(#temp[0], macro);
siz=size(#temp[0]);
Stemp="";
int kl=0;
for (n=0; n<=siz; n++)
{
if (temp[n]==' ' || temp[n]==formatic(44) || temp[n]==formatic(40) || temp[n]==formatic(41) || temp[n]=='-' || n==siz)
{
if (n<=siz)
{
if (temp[n+1]==' ' || temp[n+1]==formatic(44) || temp[n+1]==formatic(40) || temp[n+1]==formatic(41) || temp[n+1]=='-' || n==siz)goto oioio;
}
slov_makros[kl]=Stemp;
Stemp="";
kl++;
oioio:;
}
else
{
if (temp[n]!=' ' && temp[n]!=formatic(44) && temp[n]!=formatic(40) && temp[n]!=formatic(41) && temp[n]!='-' && n!=siz)Stemp=Stemp+temp[n];
}
}
if (flag_check0[0]==1 && p==1)
{
if (macro=="")return "Macro missing";
kml0=0;
for (n=0; n<kl; n++)
{
if (slov_makros[n]=="M" || slov_makros[n]=="m")
{
Tip0[kml0]="M";
n_m0[kml0]=n;
n++;if (n==kl)return "M";
X0[kml0]=formatsn(slov_makros[n]);
if (X0[kml0]==-10011001)return "M";
n++;if (n==kl)return "M";
Y0[kml0]=formatsn(slov_makros[n]);
if (Y0[kml0]==-10011001)return "M";
n++;if (n==kl)return "M";
R0_0[kml0]=formatsn(slov_makros[n]);
if (R0_0[kml0]==-10011001)return "M";
n++;
kml0++;
}
if (slov_makros[n]=="P" || slov_makros[n]=="p")
{
Tip0[kml0]="P";
n_m0[kml0]=n;
n++;if (n==kl)return "P";
R0_0[kml0]=formatsn(slov_makros[n]);
if (R0_0[kml0]==-10011001)return "P";
n++;if (n==kl)return "P";
R0_1[kml0]=formatsn(slov_makros[n]);
if (R0_1[kml0]==-10011001)return "P";
n++;
kml0++;
}
if (slov_makros[n]=="K" || slov_makros[n]=="k")
{
Tip0[kml0]="K";
n_m0[kml0]=n;
n++;if (n==kl)return "K";
K0[kml0]=slov_makros[n];
n++;
kml0++;
}
}
}
///////////////////////////
if (flag_check0[1]==1 && p==2)
{
if (macro=="")return "Macro missing";
kml1=0;
for (n=0; n<kl; n++)
{
if (slov_makros[n]=="M" || slov_makros[n]=="m")
{
Tip1[kml1]="M";
n_m1[kml1]=n;
n++;if (n==kl)return "M";
X1[kml1]=formatsn(slov_makros[n]);
if (X1[kml1]==-10011001)return "M";
n++;if (n==kl)return "M";
Y1[kml1]=formatsn(slov_makros[n]);
if (Y1[kml1]==-10011001)return "M";
n++;if (n==kl)return "M";
R1_0[kml1]=formatsn(slov_makros[n]);
if (R1_0[kml1]==-10011001)return "M";
n++;
kml1++;
}
if (slov_makros[n]=="P" || slov_makros[n]=="p")
{
Tip1[kml1]="P";
n_m1[kml1]=n;
n++;if (n==kl)return "P";
R1_0[kml1]=formatsn(slov_makros[n]);
if (R1_0[kml1]==-10011001)return "P";
n++;if (n==kl)return "P";
R1_1[kml1]=formatsn(slov_makros[n]);
if (R1_1[kml1]==-10011001)return "P";
n++;
kml1++;
}
if (slov_makros[n]=="K" || slov_makros[n]=="k")
{
Tip1[kml1]="K";
n_m1[kml1]=n;
n++;if (n==kl)return "K";
K1[kml1]=slov_makros[n];
n++;
kml1++;
}
}
}
return "yes";
}
function dialog()
{
getdisplay(col, ex, ey);
//////////////////////
pos_size_button0[0][0]=610; pos_size_button0[0][1]=85; pos_size_button0[0][2]=157; pos_size_button0[0][3]=20;
text_button0[0]="Start - Click on the Client";
//////////
pos_size_edit0[0][0]=77; pos_size_edit0[0][1]=25; pos_size_edit0[0][2]=514; pos_size_edit0[0][3]=20;
pos_size_edit0[1][0]=77; pos_size_edit0[1][1]=55; pos_size_edit0[1][2]=514; pos_size_edit0[1][3]=20;
pos_size_edit0[2][0]=719; pos_size_edit0[2][1]=25; pos_size_edit0[2][2]=48; pos_size_edit0[2][3]=20;
pos_size_edit0[3][0]=719; pos_size_edit0[3][1]=55; pos_size_edit0[3][2]=48; pos_size_edit0[3][3]=20;
pos_size_edit0[4][0]=7; pos_size_edit0[4][1]=85; pos_size_edit0[4][2]=245; pos_size_edit0[4][3]=20;
pos_size_edit0[5][0]=265; pos_size_edit0[5][1]=85; pos_size_edit0[5][2]=32; pos_size_edit0[5][3]=20;
pos_size_edit0[6][0]=300; pos_size_edit0[6][1]=85; pos_size_edit0[6][2]=32; pos_size_edit0[6][3]=20;
text_edit0[0]=""; text_edit0[1]=""; text_edit0[2]=""; text_edit0[3]=""; text_edit0[4]="HELP - http:/"+"/kibor-bot.com/forum/topic.php?forum=6&topic=34"; text_edit0[5]=""; text_edit0[6]="";
//////////
pos_size_check0[0][0]=8; pos_size_check0[0][1]=25; pos_size_check0[0][2]=60; pos_size_check0[0][3]=20;
pos_size_check0[1][0]=8; pos_size_check0[1][1]=56; pos_size_check0[1][2]=60; pos_size_check0[1][3]=20;
pos_size_check0[2][0]=610; pos_size_check0[2][1]=25; pos_size_check0[2][2]=55; pos_size_check0[2][3]=20;
pos_size_check0[3][0]=670; pos_size_check0[3][1]=25; pos_size_check0[3][2]=42; pos_size_check0[3][3]=20;
pos_size_check0[4][0]=611; pos_size_check0[4][1]=56; pos_size_check0[4][2]=55; pos_size_check0[4][3]=20;
pos_size_check0[5][0]=671; pos_size_check0[5][1]=55; pos_size_check0[5][2]=42; pos_size_check0[5][3]=20;
pos_size_check0[6][0]=485; pos_size_check0[6][1]=87; pos_size_check0[6][2]=105; pos_size_check0[6][3]=20;
text_check0[0]="Macro 1"; text_check0[1]="Macro 2"; text_check0[2]="Control"; text_check0[3]="Shift"; text_check0[4]="Control"; text_check0[5]="Shift"; text_check0[6]="Background mode";
flag_check0[0]=0; flag_check0[1]=0; flag_check0[2]=0; flag_check0[3]=0; flag_check0[4]=0; flag_check0[5]=0; flag_check0[6]=0;
//////////
pos_size_static0[0][0]=7; pos_size_static0[0][1]=6; pos_size_static0[0][2]=51; pos_size_static0[0][3]=14;
pos_size_static0[1][0]=77; pos_size_static0[1][1]=6; pos_size_static0[1][2]=100; pos_size_static0[1][3]=14;
pos_size_static0[2][0]=608; pos_size_static0[2][1]=7; pos_size_static0[2][2]=100; pos_size_static0[2][3]=17;
text_static0[0]="№ Macro"; text_static0[1]="Macro"; text_static0[2]="Start Macro";
//////////
pos_size_combo0[0][0]=347; pos_size_combo0[0][1]=84; pos_size_combo0[0][2]=125; pos_size_combo0[0][3]=80;
strok_combo0[0]=2;
text_combo0[0][0]="Window area"; text_combo0[0][1]="Client area";
flag_combo0[0]=1;
//////////
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
EDIT, #pos_size_edit0[0][0], #text_edit0[0] |
CHECK, #pos_size_check0[0][0], #text_check0[0], #flag_check0[0] |
COMBO, #pos_size_combo0[0][0], #text_combo0[0][0], #strok_combo0[0], #flag_combo0[0] |
STATIC, #pos_size_static0[0][0], #text_static0[0]);
//////////
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
/////////////////////////////////////////
pos_size_button1[0][0]=3; pos_size_button1[0][1]=3; pos_size_button1[0][2]=120; pos_size_button1[0][3]=20;
text_button1[0]="Stop";
//////////
createdialog(1, BUTTON, #pos_size_button1[0][0], #text_button1[0], #flag_button1[0]);
//////////
}
CREATE_TIMER(0, 100)
{
if (start_==0)
{
if (flag_button0[0]>0)
{
flag_button0[0]=0;
ot=Load_Macro(text_edit0[0], 1);
if (ot!="yes")
{
hidedialog(0);
messagebox ("Error macro 1 : "+ot);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
goto pr;
}
ot=Load_Macro(text_edit0[1], 2);
if (ot!="yes")
{
hidedialog(0);
messagebox ("Error macro 2 : "+ot);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
goto pr;
}
hidedialog(0);
showdialog(1, "Macro", ex-170, ey-100, 132, 55, 1, 1);
sleep(500);
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
write_config();
start_=1;
goto pr;
}
getmouse(ex5, ey5);
if (flag_combo0[0]==0)w=getwindow(0, ex5, ey5);
else w=getwindow(1, ex5, ey5);
getmouse(ex5, ey5, w);
text_edit0[5]=format(ex5);
text_edit0[6]=format(ey5);
pr:;
}
else
{
if (flag_button1[0]>0)
{
flag_button1[0]=0;
start_=0;
hidedialog(1);
showdialog(0, "Kibor - Macro. http:/"+"/kibor-bot.com", ex/2-390, ey/2-70, 780, 139, 1, 1);
}
}
}