PureBytes Links
Trading Reference Links
|
I have been using the industries.js to setup the stocks into their sectors
for some time now. After this latest beta it is no longer working. I have
done nothing different this time than any other in the past months.
Comes up with :
Windows Script Host
line 33
Char 1
Error Overflow
Code 800A0006
Source Microsoft Jscript Runtime error
Here is the code
/* change this line according to your data file name */
var filename = "Industries.csv";
var fso, f, r;
var ForReading = 1;
var AmiBroker;
var fields;
var stock;
/* Create AmiBroker app object */
AmiBroker = new ActiveXObject( "Broker.Application" );
/* ... and file system object */
fso = new ActiveXObject( "Scripting.FileSystemObject" );
/* open ASCII file */
f = fso.OpenTextFile( filename, ForReading);
/* read the file line by line */
while ( !f.AtEndOfStream )
{
r = f.ReadLine();
/* split the lines using comma as a separator */
fields = r.split(",");
/* add a ticker - this is safe operation, in case that */
/* ticker already exists, AmiBroker returns existing one */
stock = AmiBroker.Stocks.Add( fields[ 0 ] );
stock.FullName = fields[ 1 ];
stock.IndustryID = parseInt( fields[ 2 ] );
}
/* refresh ticker list and windows */
AmiBroker.RefreshAll();
WScript.Echo("Industry Setup Finished" );
Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|