SET DEFAULT TO c:\netscrape CLEAR CLOSE TABLES all PUBLIC TheText, emotion1,emotion2,foundthreat, lolink, lcurl, lcOutput TheText = " " emotion1 = " " emotion2 = " " foundthreat = " " loLINK = " " lcURL = " " lcOutput = " " ******************************** USE seedurls IN 1 USE popthreats IN 2 && pop = global population USE popresults IN 3 SELECT seedurls SCAN && Outer loop scan IF TYPE('lox')#'O' lox=CREATEOBJECT('internetexplorer.application') ENDIF lox.VISIBLE=.F. lcURL = seed &&location lcURL = ALLTRIM(TRANSFORM(lcURL)) lnTime = 1000 && = 10 SECOND lox.NAVIGATE(lcURL) lox.VISIBLE=.F. WAIT 'Navigating!' WINDOW NOWAIT ******************************** FOR EACH loLink IN lox.DOCUMENT.Links && Go to each referenced sub page - Error occurs here [OLE ERROR code 0x80004005 unspecified error] lcOutPut = [ ] + loLink.Href + [ ] + loLink.innerText lox.NAVIGATE(lcOutput) lcOutput = lox.DOCUMENT.body.innerText && Get href site text && . TheText = lcOutput ************** SELECT popthreats SCAN && Processing for individual href pages IF ALLTRIM(popthreats.threat) $ TheText TheWord = ALLTRIM(popthreats.threat) WordLength = LEN(popthreats.threat) nStartPosition = AT(ALLTRIM(popthreats.threat), TheText) && AT(cSearchExpression, cExpressionSearched [, nOccurrence]) foundthreat = SUBSTR(TheText, nStartPosition, WordLength) && SUBSTR(cExpression, nStartPosition [, nCharactersReturned]) emotion1 = SUBSTR(TheText, (nStartPosition-21), 20) && Back up 21 characters and select the next 20 letters. emotion2 = SUBSTR(TheText, WordLength, 20) && Go to the last letter in FoundThreat and take the next 20 letters. SELECT popresults APPEND BLANK REPLACE emo1 WITH emotion1 REPLACE threat WITH foundthreat REPLACE emo2 WITH emotion2 SELECT popthreats ENDIF ENDSCAN && End processing loop SELECT seedurls ************** ENDFOR && Code must be inside the FOREACH loop to access all the href pages RELEASE lox && Close this site and open a new seed URL ENDSCAN && End outer loop scan CLOSE TABLES ALL *************************