Events in win32com

Paul Moore gustav at morpheus.demon.co.uk
Wed Dec 20 22:07:04 CET 2000


On Wed, 20 Dec 2000 11:50:22 +0100, Paul Moore
<paul.moore at uk.origin-it.com> wrote:

>Grrr. I'm having problems getting events fired from any of the MS
>applications (IE, Excel), either in VBScript or in Python. Looks like
>it's something stupid I am doing... We'll ignore that for now...

Got it working (on a different machine). Looks like it's either a
config problem or an intermitent one. Everything looks great now.
Thanks for all the help.

One further question - another way of doing the same thing (in WSH) is
to assign to the "onclick" property of the HTML document in IE.
Something like

ie.document.onclick = function() { WScript.Echo("Click!") }

Is it possible to do anything like this in Python? If not, can I do
the same thing another way? (I have created ie via
DispatchWithEvents(), but the HTML document is a property of this. Can
I rewrap it somehow, say as
  doc = DispatchWithEvents(ie.document, DocEvents)
?

Thanks,
Paul



More information about the Python-list mailing list