the understated syntax export the jpg images to a local folder, but saves in name chart1.jpg, chart2.jpg....
My requirement is that it should save in the name of ticker it scans,
please advice.
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 = 0; //sheet 2 of tab 1
ADS.Item(0).ActiveWindow.ExportImage( "C:\\temp\\chart1.jpg", 800, 600);
ADS.Item(1).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(1).ActiveWindow.ExportImage( "C:\\temp\\chart2.jpg", 800, 600);
ADS.Item(2).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(2).ActiveWindow.ExportImage( "C:\\temp\\chart3.jpg", 800, 600);
ADS.Item(3).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(3).ActiveWindow.ExportImage( "C:\\temp\\chart4.jpg", 800, 600);
ADS.Item(4).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(4).ActiveWindow.ExportImage( "C:\\temp\\chart5.jpg", 800, 600);
ADS.Item(5).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(5).ActiveWindow.ExportImage( "C:\\temp\\chart6.jpg", 800, 600);
ADS.Item(6).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(6).ActiveWindow.ExportImage( "C:\\temp\\chart7.jpg", 800, 600);
}
%>
script = GetScriptObject();
if ( Status("action") == actionScan ) script.multiCapture();
Buy = 0;
My requirement is that it should save in the name of ticker it scans,
please advice.
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 = 0; //sheet 2 of tab 1
ADS.Item(0).ActiveWindow.ExportImage( "C:\\temp\\chart1.jpg", 800, 600);
ADS.Item(1).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(1).ActiveWindow.ExportImage( "C:\\temp\\chart2.jpg", 800, 600);
ADS.Item(2).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(2).ActiveWindow.ExportImage( "C:\\temp\\chart3.jpg", 800, 600);
ADS.Item(3).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(3).ActiveWindow.ExportImage( "C:\\temp\\chart4.jpg", 800, 600);
ADS.Item(4).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(4).ActiveWindow.ExportImage( "C:\\temp\\chart5.jpg", 800, 600);
ADS.Item(5).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(5).ActiveWindow.ExportImage( "C:\\temp\\chart6.jpg", 800, 600);
ADS.Item(6).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(6).ActiveWindow.ExportImage( "C:\\temp\\chart7.jpg", 800, 600);
}
%>
script = GetScriptObject();
if ( Status("action") == actionScan ) script.multiCapture();
Buy = 0;