Hi
I have this script to create screenshoot for every new open candle, but i need somebody can help me to modifie this to get by my self the time 2 ,5 ,10 seconds to get screensoot.
Code:#property copyright "Nopik" #property link "http://www.nopik.net" #property show_inputs #include <stdlib.mqh> extern bool Continuous = TRUE; extern string Sound = ""; extern int Width = 1024; extern int Height = 768; extern string FTP = "/httpdocs/screenshots"; int start() { datetime l_time_0; if (Continuous == FALSE) Snap(); else { l_time_0 = 0; while (IsStopped() == FALSE) { RefreshRates(); if (Time[0] > l_time_0) { Snap(); l_time_0 = Time[0]; } Sleep(1000); } } return (0); } void Snap() { int l_error_16; int l_datetime_0 = TimeLocal(); Comment("Snapshooter v1.2\n", TimeToStr(l_datetime_0, TIME_DATE|TIME_SECONDS)); string ls_4 = "Screenshot_" + pad(TimeYear(l_datetime_0)) + "_" + pad(TimeMonth(l_datetime_0)) + "_" + pad(TimeDay(l_datetime_0)) + " " + pad(TimeHour(l_datetime_0)) + "_" + pad(TimeMinute(l_datetime_0)) + "_" + pad(TimeSeconds(l_datetime_0)) + ".gif"; bool l_bool_12 = WindowScreenShot(ls_4, Width, Height); if (!l_bool_12) { l_error_16 = GetLastError(); Print("Error: ", l_bool_12, " ", ErrorDescription(l_error_16)); } else Print("OK"); if (Sound != "") PlaySound(Sound); if (FTP != "") SendFTP(ls_4, FTP); } string pad(int ai_0) { string ls_ret_4 = ai_0; if (StringLen(ls_ret_4) < 2) return ("0" + ls_ret_4); return (ls_ret_4); }



Reply With Quote
