Use IE Document Events ?

GUINET Eric Eric.Guinet at upmf-grenoble.fr
Fri Oct 4 06:04:50 EDT 2002


I seek to use the events of the mouse in a HTML document visualized
with Internet Explorer.
I use DispatchWithEvents to manage the events produced by IE (example
below), but the COM interface of IE does not have a manager of mouse's
events.

>>> from win32com.client import DispatchWithEvents
>>> class IEEvents:
... 	def OnVisible(self, visible):
... 		print "Changement Visible : ", visible
... 		
>>> ie = DispatchWithEvents("InternetExplorer.Application",IEEvents)
>>> ie.Visible = 1
Changement Visible :  1

Can I use DispatchWithEvents with the Document property of IE? 
How can I redirect a function on the DoubleClick event for example ?

>>> ie.Document
<win32com.gen_py.Microsoft HTML Object Library.DispHTMLDocument>
>>> print ie.Document.ondblclick 
None

Eric GUINET



More information about the Python-list mailing list