[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Off topic (Finally a decent search tool for Outlook)



PureBytes Links

Trading Reference Links




Hi,
 
I had a similar problem and TJ gave me this 
script, but there is a small prob which I have given at the end of this 
messge,
 

URLGet is not a JScript function. 
You can not type it directly in JScript. It is an external program that you have 
to "run" from JScript via Run method WshShell object, 
as shown in the newsletter, <FONT face=Arial 
size=2>that I pointed to you before: <A 
href="">http://www.amibroker.com/newsletter/02-2001.html
 

/* first, create Shell object that 
allows us to run external programs */WshShell = new 
ActiveXObject( "WScript.Shell" );
/* this handy function takes just URL 
and local file name and calls URLGet program to do the work 
*/function Download( URL, 
filename ){

  if( WshShell.Run( "URLGet " + URL + " " + 
  filename, 0, true ) == 0 ) return true;
  WScript.echo("Download of " + URL + " failed." 
  );
  return false;
}
/* Now you can use above function 
to download and store the file */  
Download( "My Http Address/ACC.txt" 
"c:\\mydata\\ACC.txt" ); 
But I still have a 
small problem, When I run the script, nothing happens. What can be the problem. 
I can download the file using URLget, but using this Script I wanted to update 
the said file - I do not want to download the whole file again and again. All 
ideas welcome since I badly have to use this feature.
<FONT face="Times New Roman" color=#000080 
size=3>Thanks
<FONT face="Times New Roman" color=#000080 
size=3>Prashanth
<FONT face="Times New Roman" color=#000080 
size=3> 
<FONT face="Times New Roman" color=#000080 
size=3> 
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  JJ 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, May 16, 2004 10:51 PM
  Subject: [amibroker] how to? with script, 
  download data from web
  i've read TJ's "HOWTO: Import quotes from Yahoo's site in 
  CSV format"found at <A 
  href="">http://www.amibroker.com/docs/ab302.html 
  .  from this i canfigure out how to assign stocks to industry groups 
  and so on usinginfo from a text file located on a local hard drive.  
  i want to skipseveral steps and access a CSV file located on the 
  web.here's an example:<A 
  href="">http://www2.standardandpoors.com/spf/csv/index/500growth.csvthe 
  only problem i'm having is trying to figure out how in windowsscript to 
  call data from a web based source.if that sounds easy, then how about 
  accessing data from XLS filesstored on the 
  net?/jeffSend BUG REPORTS to 
  bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


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








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.