Obviously I am no programmer, so please be gentle...

I am trying to import ascii stock data (total.aqd) into a technical stock analysis program (AmiBroker) using JavaScript.

The following code was copied from the AB site:

/* Create AmiBroker application object */
AmiBroker = new ActiveXObject( "Broker.Application" );

function Import( filename )
{

/* import the data using appropriate format definition file - in our case (PRN files with Ticker) this is prnn.format file */
AmiBroker.Import( 0, filename, "prnn.format" );
/* refresh ticker list and windows */
AmiBroker.RefreshAll();

}

I modifed it (with no success) to the following:

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

function Import(filename)
{

AmiBroker.Import( 0,"C:\\Program Files\\AmiBroker\\AmiQuote\\Download\\total.aqd", "aqd.format" );
AmiBroker.RefreshAll();

}

Any suggestions as to making this work?

Regards and thanks in advance,

k