Auo Export to GIF Images by an AFL--- Correction to codes requested

#12
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

:(
 
#14
#16
Alternatively I have found it:-

EnableScript("jscript");EnableScript("jscript");
<%
function multiCapture()
{
AB = new ActiveXObject("Broker.Application");
ADS = AB.Documents;

// Do not exceed number of active chart tabs.
// So if there are 3 chart tabs then max. number of Items is three, (0) to (2)
ADS.Item(0).ActiveWindow.SelectedTab = 1; //sheet 2 of tab 1
ADS.Item(0).ActiveWindow.ExportImage( "C:\\temp\\chart1.png", 800, 600);

ADS.Item(1).ActiveWindow.SelectedTab = 2; //sheet 3 of tab 2
ADS.Item(1).ActiveWindow.ExportImage( "C:\\temp\\chart1.png", 800, 600);

ADS.Item(2).ActiveWindow.SelectedTab = 3; //sheet 4 of tab 3
ADS.Item(2).ActiveWindow.ExportImage( "C:\\temp\\chart1.png", 800, 600);
}
%>

script = GetScriptObject();

if ( Status("action") == actionScan ) script.multiCapture();

Buy = 0;
It scan and export the images to C:\\temp\\ but suggest way out so that script name like Nifty-1, or SBIN-1 is exported.

thnx
How to select a specify symbol (like GOLD, SILVER) in this code
also where put code that set time frame


I want to put a code that can select symbol and then set time frame auto with this code.
please guide me
Thanks
 
#18
Please any one guide me, Image Capture(script wise) & it exports at every fixed interval like 1 sec or 2 sec.

i want display my charts on web

so please guide me, how do this, step by step, iam a poor technical knowledge person
 
#19
You cannot directly export file to the web. First using jawa script to save the image in your harddisk and using RTF software you can place at web