// This script will download Microsoft's latest FORM 10-Q // (Quarterly and Transition Reports, under Section 13 or // 15(d) of the Securities Exchange Act) // Downloads the 10Q Report in C:\temp\Microsoft.htm program SECFiling; const sPath = 'c:\Temp\'; var CompanyStr : string; procedure OnDocumentComplete(URL : string); begin if IsPartOf('http://www.sec.gov/edgar/searchedgar/companysearch.html', URL) then begin Fill('company', CompanyStr); ClickButton(''); end; if IsPartOf('http://www.sec.gov/cgi-bin/browse-edgar?company=', URL) then begin ClickHyperLink('10-Q'); end; if IsPartOf('http://www.sec.gov/Archives/edgar/data/', URL) then begin ClickHyperLink('d10q.htm'); end; if IsPartOf('d10q.htm', URL) then begin GetURLFile(sPath+CompanyStr, URL); end; end; begin CompanyStr := 'Microsoft'; Navigate('http://www.sec.gov/edgar/searchedgar/companysearch.html') end.