CODE:
win W_Kib=window ("ИГРА));
string Text_S;
string Text_P;
string Text_Str[100];
int K_Str;
int K_S;
int X_S[2000];
int Y_S[2000];
int X_Str[100];
int Y_Str[100];
int sX_S[2000];
int sY_S[2000];
double Cor_S[2000];
int Type_S[2000];
int Col_T0[1] = {0};
int Kol_F0[1] = {255};
int Screen[3000][3000];
int eCol_Kib, eX_Kib, eY_Kib;
getdisplay(eCol_Kib, eX_Kib, eY_Kib);
load_base();
Fun();
function Fun()
{
loop()
{
goto KIB_3;
KIB_8: if(formatsn(Text_P)>265 || formatsn(Text_P)==265) goto KIB_13;
goto KIB_3;
KIB_7: if(formatsn(Text_P)<255 || formatsn(Text_P)==255) goto KIB_12;
goto KIB_8;
KIB_6: if(formatsn(Text_S)>5415 || formatsn(Text_S)==5415) goto KIB_11;
goto KIB_7;
KIB_4: if(formatsn(Text_S)<5400 || formatsn(Text_S)==5400) goto KIB_10;
goto KIB_6;
KIB_3:
ReadText(2, #Screen[0][0], #W_Kib, W_Kib.leftclient, W_Kib.topclient, 0, "ПУТЬ", #Text_S, #K_S, #X_S[0], #Y_S[0], #sX_S[0], #sY_S[0], #Cor_S[0], #Type_S[0], #K_Str, #Text_Str[0], #X_Str[0], #Y_Str[0], 0, 0, 1, 0, 40, 1, -1, -1, -1, 0, #Col_T0[0], 0, 0, #Kol_F0[0], 0, 0, 99, 886, 528, 957, 551, -1, 0);
ReadText(2, #Screen[0][0], #W_Kib, W_Kib.leftclient, W_Kib.topclient, 0, "ПУТЬ", #Text_P, #K_S, #X_S[0], #Y_S[0], #sX_S[0], #sY_S[0], #Cor_S[0], #Type_S[0], #K_Str, #Text_Str[0], #X_Str[0], #Y_Str[0], 0, 0, 1, 0, 40, 1, -1, -1, -1, 0, #Col_T0[0], 0, 0, #Kol_F0[0], 0, 0, 99, 994, 528, 1051, 551, -1, 0);
goto KIB_4;
KIB_13: while(formatsn(Text_P)>255)
{
Key(1, W_Kib, 0, D, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, D, "m", "Отпустить", 0);
goto KIB_C9;
KIB_12: while(formatsn(Text_P)<265)
{
Key(1, W_Kib, 0, A, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, A, "m", "Отпустить", 0);
goto KIB_C9;
KIB_11: while(formatsn(Text_S)>5400)
{
Key(1, W_Kib, 0, W, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, W, "m", "Отпустить", 0);
goto KIB_C9;
KIB_10: while(formatsn(Text_S)<5415)
{
Key(1, W_Kib, 0, S, "m", "Нажать", 1000);
}
Key(1, W_Kib, 0, S, "m", "Отпустить", 0);
KIB_C9:
}
goto KIB_Exit;
KIB_Exit:;
}
win W_Kib=window ("ИГРА));
string Text_S;
string Text_P;
string Text_Str[100];
int K_Str;
int K_S;
int X_S[2000];
int Y_S[2000];
int X_Str[100];
int Y_Str[100];
int sX_S[2000];
int sY_S[2000];
double Cor_S[2000];
int Type_S[2000];
int Col_T0[1] = {0};
int Kol_F0[1] = {255};
int Screen[3000][3000];
int eCol_Kib, eX_Kib, eY_Kib;
getdisplay(eCol_Kib, eX_Kib, eY_Kib);
load_base();
Fun();
function Fun()
{
loop()
{
goto KIB_3;
KIB_8: if(formatsn(Text_P)>265 || formatsn(Text_P)==265) goto KIB_13;
goto KIB_3;
KIB_7: if(formatsn(Text_P)<255 || formatsn(Text_P)==255) goto KIB_12;
goto KIB_8;
KIB_6: if(formatsn(Text_S)>5415 || formatsn(Text_S)==5415) goto KIB_11;
goto KIB_7;
KIB_4: if(formatsn(Text_S)<5400 || formatsn(Text_S)==5400) goto KIB_10;
goto KIB_6;
KIB_3:
ReadText(2, #Screen[0][0], #W_Kib, W_Kib.leftclient, W_Kib.topclient, 0, "ПУТЬ", #Text_S, #K_S, #X_S[0], #Y_S[0], #sX_S[0], #sY_S[0], #Cor_S[0], #Type_S[0], #K_Str, #Text_Str[0], #X_Str[0], #Y_Str[0], 0, 0, 1, 0, 40, 1, -1, -1, -1, 0, #Col_T0[0], 0, 0, #Kol_F0[0], 0, 0, 99, 886, 528, 957, 551, -1, 0);
ReadText(2, #Screen[0][0], #W_Kib, W_Kib.leftclient, W_Kib.topclient, 0, "ПУТЬ", #Text_P, #K_S, #X_S[0], #Y_S[0], #sX_S[0], #sY_S[0], #Cor_S[0], #Type_S[0], #K_Str, #Text_Str[0], #X_Str[0], #Y_Str[0], 0, 0, 1, 0, 40, 1, -1, -1, -1, 0, #Col_T0[0], 0, 0, #Kol_F0[0], 0, 0, 99, 994, 528, 1051, 551, -1, 0);
goto KIB_4;
KIB_13: while(formatsn(Text_P)>255)
{
Key(1, W_Kib, 0, D, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, D, "m", "Отпустить", 0);
goto KIB_C9;
KIB_12: while(formatsn(Text_P)<265)
{
Key(1, W_Kib, 0, A, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, A, "m", "Отпустить", 0);
goto KIB_C9;
KIB_11: while(formatsn(Text_S)>5400)
{
Key(1, W_Kib, 0, W, "m", "Нажать", 0);
}
Key(1, W_Kib, 0, W, "m", "Отпустить", 0);
goto KIB_C9;
KIB_10: while(formatsn(Text_S)<5415)
{
Key(1, W_Kib, 0, S, "m", "Нажать", 1000);
}
Key(1, W_Kib, 0, S, "m", "Отпустить", 0);
KIB_C9:
}
goto KIB_Exit;
KIB_Exit:;
}
(Добавление)
(Добавление)
CODE:
function ReadText(int ew, int #Scr, win #w, int v_x, int v_y, int p1, string base, string #text, int #kol_sim, int #x_sim, int #y_sim, int #xs_sim, int #ys_sim, int #cor_sim, int #type_sim, int #kol_str, string #text_str, int #x_str, int #y_str, int g1, int g2, int g3, int g4, int f, int s, int k, int d1, int d2, int GT, int #col_t, int Gt, int GF, int #col_f, int Gf, int r, int i, int ex1, int ey1, int ex2, int ey2, int ignor, int dp)
{
disablesymbolbase(ALL);
enablesymbolbase(base);
pause(p1);
if (GT==0 && GF==0)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
if (GT==1 && GF==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
if (GT==1 && GF==0)
{
if (Gf==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
else
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
}
if (GT==0 && GF==1)
{
if (Gt==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
else
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
}
kol_sim=size(text);
if (kol_sim>2000) kol_sim=2000;
int ScrX=0, ScrY=0;
if (ew==3)
{
ScrX=screenstartx();
ScrY=screenstarty();
}
for (int n=0; n<kol_sim; n++)
{
x_sim[n]=ex1+symbolxpos(n)+ScrX; y_sim[n]=ey1+symbolypos(n)+ScrY;
xs_sim[n]=symbolwidth(n); ys_sim[n]=symbolheight(n);
cor_sim[n]=symbolcorrect(n);
type_sim[n]=symboltype(n);
}
if (ignor>-1)
{
char C[2000];
int tn=0;
strcpy(#C[0], text);
text="";
for (n=0; n<kol_sim; n++)
{
if (cor_sim[n]>=ignor C[n]==' ' C[n]==10 || C[n]==13)
{
text=text+C[n];
x_sim[tn]=x_sim[n];
y_sim[tn]=y_sim[n];
cor_sim[tn]=cor_sim[n];
type_sim[tn]=type_sim[n];
tn++;
}
}
int sz=size(text);
strcpy(#C[0], text);
int min;
int pmin=-99999;
text="";
int tn1;
tn=0;
A: min=99999;
tn1=-1;
for (n=0; n<sz; n++)
{
if (x_sim[n]<min && x_sim[n]>pmin) {min=x_sim[n]; tn1=n;}
}
if (tn1!=-1)
{
text=text+C[tn1];
x_sim[tn]=x_sim[tn1];
y_sim[tn]=y_sim[tn1];
cor_sim[tn]=cor_sim[tn1];
type_sim[tn]=type_sim[tn1];
if (C[tn1]!=' ' && C[tn1]!=10 && C[tn1]!=13)tn++;
pmin=min;
goto A;
}
kol_sim=tn;
}
if (dp) regexreplace(-1, #text, text, " ", "");
string t_text=text+"^r^n";
kol_str=regexsearch(100, #text_str[0], t_text, "(.*)+(?=^r^n)");
for (n=0; n<kol_str; n++)
{
x_str[n]=ex1+symbolxpos(regexstart(n))+ScrX;
y_str[n]=ey1+symbolypos(regexstart(n))+ScrY;
}
}
function Key(int ew, win w, int p1, int c, string text, string k, int p2)
{
pause(p1);
if (ew==0)
{
if (k=="Клик"){key(c); goto hy;}
if (k=="Нажать"){keydown(c); goto hy;}
if (k=="Отпустить"){keyup(c); goto hy;}
if (k=="Ввод текста"){key(text, 0, 1, getwindow()); goto hy;}
}
if (ew==1)
{
if (k=="Клик"){if ((c>191 && c<256) c==168 c==184) sendlanguage("00000419", formatiw(gethwnd())); sendmessage(WM_CHAR, c, 1, w); goto hy;}
if (k=="Нажать"){sendkeydown(c, w); goto hy;}
if (k=="Отпустить"){sendkeyup(c, w); goto hy;}
if (k=="Ввод текста")
{
if (Size_Key_Char_Kib==-1)
{
Size_Key_Char_Kib=100;
new char Key_CHAR[Size_Key_Char_Kib+1];
}
int size_key=size(text);
if (Size_Key_Char_Kib<size_key)
{
delete Key_CHAR;
Size_Key_Char_Kib=size_key;
new char Key_CHAR[Size_Key_Char_Kib+1];
}
strcpy(#Key_CHAR[0], text);
for (int n=0; n<size_key; n++)
{
if ((Key_CHAR[n]>191 && Key_CHAR[n]<256) Key_CHAR[n]==168 Key_CHAR[n]==184) sendlanguage("00000419", formatiw(gethwnd()));
sendmessage(WM_CHAR, Key_CHAR[n], 1, w);
sleep(20);
}
}
}
hy: pause (p2);
}
function load_base()
{
loadsymbolbase ("ПУТЬ");
}
function ReadText(int ew, int #Scr, win #w, int v_x, int v_y, int p1, string base, string #text, int #kol_sim, int #x_sim, int #y_sim, int #xs_sim, int #ys_sim, int #cor_sim, int #type_sim, int #kol_str, string #text_str, int #x_str, int #y_str, int g1, int g2, int g3, int g4, int f, int s, int k, int d1, int d2, int GT, int #col_t, int Gt, int GF, int #col_f, int Gf, int r, int i, int ex1, int ey1, int ex2, int ey2, int ignor, int dp)
{
disablesymbolbase(ALL);
enablesymbolbase(base);
pause(p1);
if (GT==0 && GF==0)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, -1, 0, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
if (GT==1 && GF==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
if (GT==1 && GF==0)
{
if (Gf==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], 1, r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
else
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, #col_t[0], -1, r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
}
if (GT==0 && GF==1)
{
if (Gt==1)
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, 1, #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
else
{
if (ew==0) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, -1);
if (ew==1) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, v_x+ex1, v_y+ey1, v_x+ex2, v_y+ey2, -1);
if (ew==2) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, w);
if (ew==3) readtext (g1*RU | g2*EN | g3*NUM | g4*MARK, #text, f, s, k, d1, d2, -1, #col_f[0], r, i, ex1, ey1, ex2, ey2, #Scr[0][0]);
}
}
kol_sim=size(text);
if (kol_sim>2000) kol_sim=2000;
int ScrX=0, ScrY=0;
if (ew==3)
{
ScrX=screenstartx();
ScrY=screenstarty();
}
for (int n=0; n<kol_sim; n++)
{
x_sim[n]=ex1+symbolxpos(n)+ScrX; y_sim[n]=ey1+symbolypos(n)+ScrY;
xs_sim[n]=symbolwidth(n); ys_sim[n]=symbolheight(n);
cor_sim[n]=symbolcorrect(n);
type_sim[n]=symboltype(n);
}
if (ignor>-1)
{
char C[2000];
int tn=0;
strcpy(#C[0], text);
text="";
for (n=0; n<kol_sim; n++)
{
if (cor_sim[n]>=ignor C[n]==' ' C[n]==10 || C[n]==13)
{
text=text+C[n];
x_sim[tn]=x_sim[n];
y_sim[tn]=y_sim[n];
cor_sim[tn]=cor_sim[n];
type_sim[tn]=type_sim[n];
tn++;
}
}
int sz=size(text);
strcpy(#C[0], text);
int min;
int pmin=-99999;
text="";
int tn1;
tn=0;
A: min=99999;
tn1=-1;
for (n=0; n<sz; n++)
{
if (x_sim[n]<min && x_sim[n]>pmin) {min=x_sim[n]; tn1=n;}
}
if (tn1!=-1)
{
text=text+C[tn1];
x_sim[tn]=x_sim[tn1];
y_sim[tn]=y_sim[tn1];
cor_sim[tn]=cor_sim[tn1];
type_sim[tn]=type_sim[tn1];
if (C[tn1]!=' ' && C[tn1]!=10 && C[tn1]!=13)tn++;
pmin=min;
goto A;
}
kol_sim=tn;
}
if (dp) regexreplace(-1, #text, text, " ", "");
string t_text=text+"^r^n";
kol_str=regexsearch(100, #text_str[0], t_text, "(.*)+(?=^r^n)");
for (n=0; n<kol_str; n++)
{
x_str[n]=ex1+symbolxpos(regexstart(n))+ScrX;
y_str[n]=ey1+symbolypos(regexstart(n))+ScrY;
}
}
function Key(int ew, win w, int p1, int c, string text, string k, int p2)
{
pause(p1);
if (ew==0)
{
if (k=="Клик"){key(c); goto hy;}
if (k=="Нажать"){keydown(c); goto hy;}
if (k=="Отпустить"){keyup(c); goto hy;}
if (k=="Ввод текста"){key(text, 0, 1, getwindow()); goto hy;}
}
if (ew==1)
{
if (k=="Клик"){if ((c>191 && c<256) c==168 c==184) sendlanguage("00000419", formatiw(gethwnd())); sendmessage(WM_CHAR, c, 1, w); goto hy;}
if (k=="Нажать"){sendkeydown(c, w); goto hy;}
if (k=="Отпустить"){sendkeyup(c, w); goto hy;}
if (k=="Ввод текста")
{
if (Size_Key_Char_Kib==-1)
{
Size_Key_Char_Kib=100;
new char Key_CHAR[Size_Key_Char_Kib+1];
}
int size_key=size(text);
if (Size_Key_Char_Kib<size_key)
{
delete Key_CHAR;
Size_Key_Char_Kib=size_key;
new char Key_CHAR[Size_Key_Char_Kib+1];
}
strcpy(#Key_CHAR[0], text);
for (int n=0; n<size_key; n++)
{
if ((Key_CHAR[n]>191 && Key_CHAR[n]<256) Key_CHAR[n]==168 Key_CHAR[n]==184) sendlanguage("00000419", formatiw(gethwnd()));
sendmessage(WM_CHAR, Key_CHAR[n], 1, w);
sleep(20);
}
}
}
hy: pause (p2);
}
function load_base()
{
loadsymbolbase ("ПУТЬ");
}