every 3 minutes isn't infinite.
if you want an endless loop you can use
every 3 minutes isn't infinite.
if you want an endless loop you can use
thanks;
if I use " while() " I get this Error: 'while' - expression expected screentest.mq4 31 4
I want every 3 minutes take one screenshot and save it as tester.gif and overwrite last tester.gif .
Please put the screenshot function in OnTimer() function and set it to 3 min.
thanks a lot;
I read in Documentation "The OnTimer() function is called when the Timer event occurs, which is generated by the system timer only for Expert Advisors and indicators - it can't be used in scripts."
I don't know how to " put the screenshot function in OnTimer() function and set it to 3 min." is there an other possibility to do that in my Script?
- docs.mql4.com
Please put the screenshot function in OnTimer() function and set it to 3 min.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
how can I change this Code to cause an infinite loop within my Script every 3 Minutes:
//+------------------------------------------------------------------+
//| screentest.mq4 |//| Copyright 2016, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
int x;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{do
{
for(x=1;x<=7000; x++);
int lasterror=0;
{
//---- make WindowScreenShot for further checking
if(!WindowScreenShot("shots\\tester"".gif",640,480))
lasterror=GetLastError();
Sleep(3000);
}
}
while(x<=7000);
return;
}
//+------------------------------------------------------------------+