[Tutor] registering itunes with events
Alan Gauld
alan.gauld at btinternet.com
Fri Nov 17 10:32:01 CET 2006
"Orri Ganel" <singingxduck at gmail.com> wrote
> been fruitless. My best guess is something along the lines of:
>
> iTunes =
> win32com.client.gencache.EnsureDispatch("iTunes.Application")
> iTunesEvents = win32com.client.WithEvents(iTunes,
> iTunesEventHandler)
>
> where iTunesEventHandler is a class with methods OnPlayerPlayEvent,
Are you sure its a class? I haven't looked into this but from
past experience with Win32 I'd expect the event handler to
be a function that takes the event and then calls the appropriate
handler function. But I haven't checked the Python implementation
so I could be completely off track there.
Alan G.
More information about the Tutor
mailing list