CODE:string vopros="";
//beep(700, 400); beep(700, 400); sleep(1000);
//beep(700, 200); beep(700, 200);
getmouse(x_sms_okno, y_sms_okno);
w_sms=getwindow(0, x_sms_okno, y_sms_okno);
loop(5) {sendkey(112, w_KIB); sleep(200);}
sendkey(113, w_KIB); sleep(250);
sendkey('4', w_KIB); sleep(250);
sendkey(113, w_KIB); sleep(250);
sendkey('2', w_KIB); sleep(650);
sms();
readtext (RU | MARK, #vopros, 4, 3, 38, -1, -1, -1, -1, 0, -1, x_n, y_n, xx_k, yy_k, w_KIB);
sleep(20);
string pyt="d:\bolt\Log.txt";
string pyt_prog="d:\bolt\boltalka.exe";
string str[3];
int siz;
char ch_vhod[250];
int nom=0, tnom=0;
strcpy(#ch_vhod[0], vopros);
siz=size(#ch_vhod[0]);
loop()
{
if(replacetext(#ch_vhod[tnom], #nom, "ь1" ~ "ы")==0) goto vyh;
tnom=tnom+nom;
}
vyh:;
deletetext(#ch_vhod[0], "?" | "!" | "," | "." | "7" | formatic(40) | formatic(41)); //удаляем символы
vopros=format(#ch_vhod[0], siz); //это отправим в болталку
fopen (pyt, "w"); fclose(); //удаляет прошлый лог
start(pyt_prog); //открываю болталку
while(window ("Болталка", "#32770", -1)==0) sleep(100); //ждем открытие прог
sleep(400);
sendtext(vopros, window (-1, "Edit", window ("Болталка", "#32770", -1)));
sendkey(13,window ("Болталка", "#32770", -1)); sleep(500); //отправили text
activate(window ("Болталка", "#32770", -1));sleep(500);
keydown(MENU); sleep(100); key(F4); keyup(MENU); //закрыли
fopen (pyt, "r");
freadline(str[0]);
fread(str[1]);
freadline(str[2]);
fclose();
//////////////////////////////////////////////////////
char CTEXT1[1000];
int nom1, siz1;
strcpy(#CTEXT1[0], str[2]);
if (findtext(#CTEXT1[0], #nom1, #siz1, "научи" & "отвечать")!=-1)
{
//messagebox(format(#CTEXT[nom], siz));
if (format(#CTEXT1[nom1], siz1)==format(#CTEXT1[nom1], siz1))
{
int ra=rand(1, 9);
if(ra==1) str[2]="1 ";
if(ra==2) str[2]="2 ";
if(ra==3) str[2]="3 ";
if(ra==4) str[2]="4 ";
if(ra==5) str[2]="5 ";
if(ra==6) str[2]="6 ";
if(ra==7) str[2]="7 ";
if(ra==8) str[2]="8 ";
if(ra==9) str[2]="9 ";;
}
}
//////////////////////////////////////////////////////
sendkey(UP, w_KIB); sleep(250);sendkey(UP, w_KIB); sleep(250);
sendkey(13, w_KIB); sleep(250); sendkey('4', w_KIB); sleep(350);
activate(w_KIB); sleep(50);
sendmouse(LEFT, 213, 438, w_KIB); sleep(200);
key(str[2]); sleep(200); key(13);
activate(w_sms); sleep(50);
loop(5) {sendkey(112, w_KIB); sleep(200);}