program Google; const ExportFile = 'c:\temp\google.xls'; var KeywordStr : string; procedure OnDocumentComplete(URL : string); begin if URL = 'http://www.google.com/' then begin Fill('q', KeywordStr); ClickButton('btnG'); end; if IsPartOf('http://www.google.com/search?', URL) then begin ExtractHyperLinks(ExportFile, KeywordStr, 'onmousedown'); ClickHyperLink('Next'); end; end; begin DeleteFile(ExportFile); KeywordStr := Readln('Enter Keyword:'); Navigate('http://www.google.com/') end.