Another MSIE Python Question

Michael Geary Mike at DeleteThis.Geary.com
Sat Jun 19 12:56:46 EDT 2004


Ralph A. Gable wrote:
> I am opening MSIE6 with this code:
>
>     ie=Dispatch('InternetExplorer.Application.1')
>     ie.Navigate(url)
>     while ie.Busy:
>         time.sleep(0.1)
>     ied=ie.Document
>     while ied.ReadyState != 'complete':
>         time.sleep(0.1)
>
>     ieh=ied.documentElement.outerHTML
>
>
> When opening Word or Excel, and using Dispatch('Word.Application') or
> Dispatch('Excel.Application'), the app comes up and is available and can
be
> brought up on the screen by setting .Visible = 1. When using the above
code,
> IE will not come up. I have to open IE by clicking on its icon and then
the
> above code will work. If I don't do that I get a stack dump and my python
> program crashes.

My working code is similar to yours, but I use
'InternetExplorer.Application' instead of 'InternetExplorer.Application.1'
in the Dispatch call. I wonder if that could make the difference.

-Mike





More information about the Python-list mailing list