Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What About Netscape?
Message
From
09/09/2001 19:35:29
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00552193
Message ID:
00554490
Views:
21
>You cannot. Netscape isn't automation server.

As a matter of fact, it is. Not too powerfull but probably quantum satis for Adrián's purposes. Full specs can be found at http://developer.netscape.com/docs/manuals/communicator/OLE/index.htm. Meanwhile the following code can be to Adrián's assistance.
loNetScape = CREATEOBJECT("Netscape.Network.1")

IF loNetScape.Open("http://www.somewhere.com/index.html",0,"",0,"")

  DO WHILE loNetScape.GetStatus()=0x0100
  ENDDO

  IF loNetScape.GetStatus()=0x0000
    lcBuffer = ""
    lcTemp = SPACE(32768)
    DO WHILE !loNetScape.IsFinished()
      lnLength = loNetScape.Read(@lcTemp,4000)
      IF lnLength>0
        lcBuffer = lcBuffer+LEFT(lcTemp,lnLength)
      ENDIF
    ENDDO

    IF lcBuffer$"Error 404"
      WAIT WINDOW "Some stuff"
    ELSE
      WAIT WINDOW "Other stuff"
    ENDIF

    ? lcBuffer
  ENDIF

  loNetScape.Close()
ENDIF
[...]
>>
Do While oIE.Document.ReadyState <> "complete"
>>Enddo
>>
>>lcHTML = oIE.document.documentElement.innerHTML
>>If Atc("Error 404", lcHTML)<>0 Then
>>	Some Code
>>else
>>	Some Code
>>Endif
>>
>>Now, how can I do the same with Netscape Navigator? [...]

bye
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform