win32com and events

Andreas Ulbrich the.ulbi at gmx.net
Sat Dec 7 11:00:25 EST 2002


I try to script an instance of the internet exploder via win32com. I 
have problems getting events to work:

ie = win32com.client.Dispatch("InternetExplorer.Application")
ie.Navigate(<url that points to a document, which \
	contains a button called 'hitme'>)
button = ie.document.getElementById('hitme')

# button is a IHTMLElement3
# I'm interested in events say onclick
button.onclick = <what do i have to assign here?>

The docs for IHTMLElement3 say that onclick must hold a dispatch VARIANT 
with a default method. How do create such an object, especially with a 
default method?




More information about the Python-list mailing list