program Search_Engines; // Fill out Newbie Form and simultaneously search // from Google, Yahoo and MSN // Make sure Navigate() contains the correct path // select "Launch in IE" when running this script var bStop : boolean; sKeyword: string; { Process events here } procedure OnDocumentComplete(URL : string); begin if IsPartOf('http://www.yahoo.com', URL) then begin // extract keyword from Newbie Form sKeyword := ExtractURLParam('Keyword'); Fill('p', sKeyword); ClickButton('sm'); OpenInternetExplorer('http://www.google.com'); end; if IsPartOf('http://www.google.com', URL) then begin Fill('q', sKeyword); ClickButton('btnG'); OpenInternetExplorer('http://www.msn.com'); end; if IsPartOf('http://www.msn.com', URL) and not(bStop) then begin Fill('q', sKeyword); ClickButton(''); // use bStop to prevent looping bStop := True; end; end; { This is the main program body. } begin bStop := False; Navigate('C:\Program Files\Newbie\Forms\SearchEngine.htm'); end.