*! version 1.0, Neal Caren, 05jan2011 capture program drop weathr program weathr version 10 syntax [anything(name=lookup)] tempfile weather tempname fh current forecast weathrzipcode if `"`lookup'"'=="" { capture confirm e $weathrzipcode if _rc { display as error _n "You didn't enter a zip code and I couldn't find the global weathrzipcode. Sorry." exit } else { local lookup $weathrzipcode } } set tracedepth 1 set trace off foreach `weathrzipcode' in `lookup' { capture if ``weathrzipcode''<10000 { } if _rc { display as error _ "You seem to have included something that isn't a US zipcode." exit } local `forecast' "" capture copy "http://weather.yahooapis.com/forecastrss?p=``weathrzipcode''" `weather', replace set trace off if _rc { display as error _n "Can't seem to connect with yahoo.com for ``weathrzipcode''. Perhaps it is too stormy or you entered a bad zip code." exit } *doedit `weather' local `current' 0 local `forecast' "" file open `fh' using `weather', read file read `fh' line while r(eof)==0 { if regexm(`"`line'"',"Conditions ") { local place: subinstr local line "