win32: internet explorer automation problem

mic aldo123 at onet.pl
Fri Jan 9 10:57:09 CET 2004


> I guess you just need to use the usual browser object model (the one

> exposed to JavaScript &c.) -- eg. window.focus(), window.blur().

> IIRC, it's IHTMLDocument2, or similar, that you want.

I don't think this could work - my piece of code is assumed to be completely
separated from the HTML itself. It just 'watches' the MSIE behaviour and
simulates the user work. AFAIK opening popup creates another MSIE instance,
so I simply loose the context. It'd be perfect if external window will be
treated using IHTMLDocument object model, but window object works according
to this excerpt from MSDN like this:

'Typically, the browser creates one window object when it opens an HTML
document. However, if a document defines one or more frames (that is,
contains one or more frame or iframe tags), the browser creates one window
object for the original document and one additional window object for each
frame'

So there is no easy way of doing it like
Document.NewWindow.documentelement.outerHTML. There is some ppDisp parameter
within OnNewWindow2 event, that looks like some sort of way to go...

Michal





More information about the Python-list mailing list