CODE:
// news
int px[1], py[1];
int n = 0;
//глобальні змінні
int address_sent = 0, check_enter = 0;
string login_sent[100];
//
win w = window ("KrafterMT", "TForm", -1); activate(w);
//Виклик
load_image();
//
loop()
{
check();
sleep(1000);
login();
sleep(10000);
}
//
function login()
{
if(fopen ("D:\test.txt", "r")!=0)
{
if(login_sent[n] != "")
{
freadline(login_sent[n]);
{
if(findimage(1, #i_enter[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
mouse(LEFT, px[0], py[0] + 170, w);
sleep(1000);
messagebox(login_sent[n]);
n++;
}
}
}
}
fclose();
}
function check()
{
if(address_sent == 0)
{
if(findimage(1, #i_check_load_page_proxy[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
sleep(1000);
mouse(LEFT, px[0] + 200, py[0] + 90, w);
sendlanguage("00000409", w);
key("m.vten.ru/login"); key(13); //filling and enter
address_sent = 1;
}
}
while(check_enter == 0)
{
if(findimage(1, #i_enter[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
address_sent = 1;
check_enter = 1;
}else{check_enter = 0;}
}
}
int i_check_load_page_proxy[200][200], i_enter[100][100];
function load_image()
{
loadimage (#i_check_load_page_proxy[0][0], "D:\afm\texture\check_load_page_proxy.bmp");
loadimage (#i_enter[0][0], "D:\afm\texture\enter.bmp");
int px[1], py[1];
int n = 0;
//глобальні змінні
int address_sent = 0, check_enter = 0;
string login_sent[100];
//
win w = window ("KrafterMT", "TForm", -1); activate(w);
//Виклик
load_image();
//
loop()
{
check();
sleep(1000);
login();
sleep(10000);
}
//
function login()
{
if(fopen ("D:\test.txt", "r")!=0)
{
if(login_sent[n] != "")
{
freadline(login_sent[n]);
{
if(findimage(1, #i_enter[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
mouse(LEFT, px[0], py[0] + 170, w);
sleep(1000);
messagebox(login_sent[n]);
n++;
}
}
}
}
fclose();
}
function check()
{
if(address_sent == 0)
{
if(findimage(1, #i_check_load_page_proxy[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
sleep(1000);
mouse(LEFT, px[0] + 200, py[0] + 90, w);
sendlanguage("00000409", w);
key("m.vten.ru/login"); key(13); //filling and enter
address_sent = 1;
}
}
while(check_enter == 0)
{
if(findimage(1, #i_enter[0][0], 0, #px[0], #py[0], 0, 0, 1366, 768, w)==1)
{
address_sent = 1;
check_enter = 1;
}else{check_enter = 0;}
}
}
int i_check_load_page_proxy[200][200], i_enter[100][100];
function load_image()
{
loadimage (#i_check_load_page_proxy[0][0], "D:\afm\texture\check_load_page_proxy.bmp");
loadimage (#i_enter[0][0], "D:\afm\texture\enter.bmp");