if(!WindowScreenShot("ScreenshotsDir\\" + ID + ".gif",ScreenShotWidth,ScreenShotHeight,-1,-1,-1)) { Print(GetLastError()); }
How much time delay is there between consecutive calls of this?
There is nothing in the code for a time delay, would just be the amount of time take to loop back through the code. I'm not a developer but if you could put the code in to include a time delay that would just compile for me I'd gladly test it :)
I'll also report back on this suggestion to get the error:
if(!WindowScreenShot("ScreenshotsDir\\" + ID + ".gif",ScreenShotWidth,ScreenShotHeight,-1,-1,-1)) { Print(GetLastError()); }
There is nothing in the code for a time delay, would just be the amount of time take to loop back through the code. I'm not a developer but if you could put the code in to include a time delay that would just compile for me I'd gladly test it :)
I'll also report back on this suggestion to get the error:
You can use this code to see how long it is between attempts to make a screenshot. I'd be interested to see the time delay on the 0kb screenshots.
static uint LastShot=0; if(!WindowScreenShot("ScreenshotsDir\\" + ID + ".gif",ScreenShotWidth,ScreenShotHeight,-1,-1,-1)) { Print(GetLastError()); } printf("Time between screenshots was %d ms",GetTickCount()-LastShot); LastShot=GetTickCount();
You can use this code to see how long it is between attempts to make a screenshot. I'd be interested to see the time delay on the 0kb screenshots.
Hello,
When trying to compile I get these two errors:
'unit' - declaration without type 'LastShot' - undeclared identifier
Sorry I'm not much of a programmer just trying to make this one change on my own.
I've just rechecked that code and it compiles without any problem at my end, so I'm guessing you've made a typographical error somewhere in your code where you have inserted it.
If you post up some more code I can help, otherwise you'll need to start double checking everything.
I can see that Trader88888 has mis-typed uint as unit
I can see that Trader88888 has mis-typed uint as unit
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have a continued problem with the creation of screenshots in metatrader.
There is no consistency to this problem that I can find. The problem: Screenshots are being created with 0 bytes (sometimes)
I'm not sure how to solve this as there is no consistency. I know people are going to ask for the code but it makes no difference. This is the ONLY line of code in the entire program that takes a screenshot.
The same line of code gets executed and one time I'll have a screenshot, the next time I'll have a screenshot but the file is 0 bytes. There is only one line of code and i'm getting a different result each time even though the same code is being executed.
Does anyone have any insights on why this could be happening? Your assistance would be very much appreciated.