[python-win32] Problem Controlling Internet Explorer

Rick Kaye rick@kaye.to
Fri, 07 Mar 2003 11:15:48 -0500


I figured it out. The program I use to stop pop-ups was preventing the open
call from executing. The pop-up prevention program is smart enough to allow
the open call when it's initiated by a mouse click but stops it when it's
initiated programmatically.

Mark, thanks for your help.

> -----Original Message-----
> From: Rick Kaye [mailto:rick@kaye.to]
> Sent: Friday, March 07, 2003 1:07 AM
> To: 'Mark Hammond'; 'python-win32@python.org'
> Subject: RE: [python-win32] Problem Controlling Internet Explorer
> 
> > > IE=Dispatch("InternetExplorer.Application")
> > > while IE.Busy:
> > >         pass
> >
> > This is pretty evil - you will be chewing 100% of CPU.  At least put a
> > "sleep()" in.
> >
> > Better, you should use IE events - see win32com\test\testExplorer.py
> 
> Agreed. As soon as I get this working, I will clean up the code.
> 
> > >                     window.open("/test2.html");
> >
> > Does a fully-qualified URL work?  It may be that the "current drive" is
> > different in the 2 cases.
> >
> > Mark.
> 
> I don't think this is it. I tried a fully-qualified URL and it didn't
> work. I also switched the javascript function to
> window.navigate("/test2.html"); and it found test2.html with no problem.