[Tutor] registering itunes with events
Orri Ganel
singingxduck at gmail.com
Fri Nov 17 12:52:30 CET 2006
Alan Gauld wrote:
>"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.
>
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>
It's a class that I have to define myself, so you're right that it
doesn't come with win32com et al.
More information about the Tutor
mailing list