Automatic Export Explore to CSV(s) files - Need Help with OLE

Dear experts!

I installed both AB(x86) - use for EOD chart, and AB(x64) use for Intraday chart.
Everyday, I have to do explore and then export results to CSV files. Of course, export intraday in AB 64bit, and export EOD in AB 32bit.

I have 5 files APX (batch) for Intraday, 5 files APX for EOD.

The code I copy from Amibroker User's Guide as bellow:

AB = new ActiveXObject( "Broker.Application" ); 

try 
{ 
     NewA = AB.AnalysisDocs.Open( "C:\\Report1.apx" ); 
     

     if (NewA ) 
     { 
          NewA.Run( 1 ); 

          while (NewA.IsBusy ) WScript.Sleep( 500 ); 

          NewA.Export( "C:\\Result\\Report1.csv" ); 
          WScript.echo( "Completed" ); 

          NewA.Close();
      } 
} 
catch ( err ) 
{ 
      WScript.echo( "Exception: " +err.message );

Abort( )

How to add more APX (batch) to the code?
(the next APX file is Report2.apx; Report3.apx.....);

or I have to make many OLE for each APX batch?

Thank you !

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.