Results 1 to 3 of 3

Thread: Autonomous IE

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    169

    Arrow Autonomous IE

    I would like to autonomously access a web page, parse the document and do what I need to do with the collected data. The IE window will be invisible to the user therefore I need to detect any errors associated with a bad URL or a inaccessable page, etc..

    For example: If I navigate to the page and encounter a 404 error, then I would not parse.

    HOW DO I ACCOMPLISH THIS?? I can't find a property that would hold such HTTP status codes in the IE object.


    'example code:

    Dim IE as New InternetExplorer
    Dim Doc as New HTMLDocument


    IE.Navigate "www.myURL.com", navNoReadFromCache

    'i will start a timer here and IE.STOP if things take too long
    timer1.interval = 30000
    timer1.enabled = true

    Do Until IE.ReadyState = READYSTATE_COMPLETE
    if userStopFlag = true then
    IE.STOP
    exit sub
    endif
    Loop

    timer1.enabled = false

    'HERE IS WHERE I WANT TO EXAMINE TO SEE IF I REALLY
    'HAVE SOMETHING TO PARSE, MAYBE THE URL IS BAD OR
    'WHATEVER, I WANT TO KNOW IF THERE ARE ANY ERRORS
    'BEFORE I PARSE. Such as 503, 404, etc....


    'If we get here then we can begin document processing.
    Last edited by vb_lover; May 23rd, 2010 at 09:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width