Applescript download series of stock charts from URL

I am a total newbie. I would like to download the stock charts in the following URL to a desktop folder named “1d 08 10 09” (August 10, 2009). The charts should be named with the ticker symbol and the date, as above. I need to be able to do this monday through friday.,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=

It would be nice to be able to enter the URL, date and folder through a dialog box.


Hi Dave,

Mostly on the forums we help people learn applescript rather than just write scripts for people. As such what you need to do is search the forums and try to write it yourself first, then we can answer specific questions you may have. There’s also some great tutorials you can do to learn the basics.

I suggest you search the forums for “curl”. Using curl you can download the html code for the link you provided. Once you get the html code you’ll need to extract all the links from the html, then you can use curl again to download each of those image links. Of course there’s a lot more to it than that if you want it saved in a specific location and with specific names, so in total there’s a lot to what you’re asking.

If you’re just looking for a custom script and not really to learn applescript, then you can contact me offline and for a small fee I’ll write it for you. Otherwise, to get you started here’s some code for you to play with. The following will display a dialog box where you can enter the link, and then use curl to download the html code.


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