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

[amibroker] Re: Newbie question



PureBytes Links

Trading Reference Links




<FONT face=Arial 
color=#0000ff size=2>Thanks oh dark one!
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>d

  
  
  From: black_marubozu 
  [mailto:groups@xxxxxxxxxxxx] Sent: Sunday, May 16, 2004 5:41 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  how to? with script, download data from web
  hello,--- In amibroker@xxxxxxxxxxxxxxx, "dingo" 
  <waledingo@xxxx> wrote:> Thanks!  I'll play with it. Got any 
  other "gems"?ok.. sometimes data are in binary format.. below is an 
  example in VBS that will download a picture "dual_xeon_011.jpg". *sDestFolder* 
  variable points to C:\ so expect the picture there. it takes some time to 
  complete the task -- be patient.this script may give you a flavor how to 
  manipulate other types of binary data.for me the most valuable source 
  of information on scripting was microsoft's scripting usenet groups and the 
  documentation on their 
  website.cheers,BM'Requires:'' - XML 3.0 for 
  "msxml2.ServerXMLHTTP"' - ADO 2.5+ for "adodb.stream"'sSrcUrl = 
  "<A 
  href="">http://www.2cpu.com/albums/iwill_dpi533/"sDestFolder 
  = "C:\"sImageFile = "dual_xeon_011.jpg"sContentTypeExpected = 
  "image/jpeg"set oHTTP = 
  CreateObject("msxml2.ServerXMLHTTP")oHTTP.open "GET", sSrcUrl & 
  sImageFile, FalseoHTTP.sendif oHTTP.status <> 200 
  then  msgbox "unexpected status = " & oHTTP.status & vbcrlf 
  & oHTTP.statusText  wscript.quitend 
  ifsContentTypeReturned = oHTTP.getResponseHeader("content-type")if 
  sContentTypeReturned <> sContentTypeExpected then  msgbox 
  "unexpected content-type = " & sContentTypeReturned & vbcrlf & 
  "expected = " & sContentTypeExpected  wscript.quitend 
  ifset oStream = createobject("adodb.stream")Const adTypeBinary = 
  1Const adSaveCreateOverWrite = 2oStream.type = 
  adTypeBinaryoStream.openoStream.write 
  oHTTP.responseBodyoStream.savetofile sDestFolder & sImageFile, 
  adSaveCreateOverWriteset oStream = nothingset oHTTP = 
  nothingmsgbox "Done..."Send 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.