Fazendo download de arquivos de um site remoto com Applescript

  • Post author:
  • Post category:Sem categoria

set defaultLink to “http://finance.yahoo.com/q/ta?s=NXG,OCNF,ODP,PDS,PMI,PWAV,Q,RAD,RDN,RF,RFMD,RRI,S,SKS,SNV,SONS,SQNM,STSI,TGB,THC,UAUA,UCBH,UIS,UMC,USU,WEN,XOMA,YRCW^GSPC,^DJI,^IXIC&t=1d&l=on&z=l&q=c&p=m50,m200,v&a=&c=”

display dialog “Please enter the Yahoo Link…” default answer defaultLink with icon note buttons {“Cancel”“OK”} default button “OK” with title “Get Yahoo Charts”

set yahooLink to text returned of result
if yahooLink is not “” then
   set htmlCode to do shell script “curl “ & quoted form of yahooLink
end if