CODE:
string path_dev_rel = "C:\_work\projects_\";
win contr_g = window ("Chrome Legacy Window", "Chrome_RenderWidgetHostHWND", window ("Вы слушаете Chill-Out на radiorecord.ru - Google Chrome", "Chrome_WidgetWin_1", -1));
log_t("Не удалось прогрузить страницу "+log_s(0, 0, 1285, 639));
log_t("обнаружен, Скриншот: "+log_s(0, 0, 1285, 639));
function log_t(string txt){ // запись строки в файл по локальному времени с пк
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
getlocaltime(Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
if(fopen(path_dev_rel+"Log\"+format(Day)+"-"+format(Month)+"-"+format(Year)+".txt","a")){
fwrite("["+format(Hour)+":"+format(Minute)+":"+format(Second)+"]"+" "+txt);
fwrite(ENDL);
fclose();
}
}
function log_s(int xs, int ys, int xf, int yf){
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
getlocaltime(Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
string name_s=format(Day)+"-"+format(Hour)+"-"+format(Minute)+"-"+format(Second);
savescreen(path_dev_rel+"Log\Log_screen\"+name_s+".bmp", xs, ys, xf, yf, contr_g);
return name_s;
}
win contr_g = window ("Chrome Legacy Window", "Chrome_RenderWidgetHostHWND", window ("Вы слушаете Chill-Out на radiorecord.ru - Google Chrome", "Chrome_WidgetWin_1", -1));
log_t("Не удалось прогрузить страницу "+log_s(0, 0, 1285, 639));
log_t("обнаружен, Скриншот: "+log_s(0, 0, 1285, 639));
function log_t(string txt){ // запись строки в файл по локальному времени с пк
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
getlocaltime(Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
if(fopen(path_dev_rel+"Log\"+format(Day)+"-"+format(Month)+"-"+format(Year)+".txt","a")){
fwrite("["+format(Hour)+":"+format(Minute)+":"+format(Second)+"]"+" "+txt);
fwrite(ENDL);
fclose();
}
}
function log_s(int xs, int ys, int xf, int yf){
int Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds;
getlocaltime(Year, Month, DayOfWeek, Day, Hour, Minute, Second, Milliseconds);
string name_s=format(Day)+"-"+format(Hour)+"-"+format(Minute)+"-"+format(Second);
savescreen(path_dev_rel+"Log\Log_screen\"+name_s+".bmp", xs, ys, xf, yf, contr_g);
return name_s;
}