cannot export the images from amibroker to external drive with using jscript code in afl formula...
pls reply with solutions..
for few time it works then shows error..
code --
EnableScript( "jscript" );
<%
function multiCapture()
{
AB = new ActiveXObject("Broker.Application");
ABDOCS = AB.Documents;
outputdrive="C://img//"
saveimage = outputdrive;
var i;
for(i=0; i <2; i++)
{
ABDOCS.Item(i).ActiveWindow.SelectedTab = 0;
Ticker = ABDOCS.Item(i).Name;
output = saveimage + Ticker + i + ".gif";
ABDOCS.Item(i).ActiveWindow.ExportImage(output, 650, 450);
}
}
%>
script = GetScriptObject();
script.multiCapture();
Error Occuring :
Error :19
COM method/function "multiCapture" call failed
COM error: COM error: HRESULT=80020101