program Check_For_String_In_Web_Page; // This is a sample script to check if a string you are // looking for exists in a particular web page. Use the // GetHTMLBody() function to return the html code and // compare your string against it using IsPartOf() const cSearchString = 'green tomatos'; sSubStringToCheck = 'Relish'; var bSearch : boolean; { Process events here } procedure OnDocumentComplete(URL : string); begin if IsPartOf(sSubStringToCheck, GetHTMLBody) then begin ShowMessage(sSubStringToCheck + ' - exists!'); NewbieScriptEnd; // stop script end else if IsPartOf('http://www.msn.com', URL) and not(bSearch) then begin Fill('q', cSearchString); ClickButtonValue('Search Web'); bSearch := True; end; end; { This is the main program body. } begin bSearch := False; Navigate('http://www.msn.com'); end.