| |||||||
| Commercial message | |
| | |
|
![]() |
| | Thread Tools |
| | #1 (permalink) |
| New on Forum Join Date: Feb 2008
Posts: 3
| NeroCOM events and wxPython, need help Hello, I'm trying to use NeroCOM in a Python program and I'm dealing with events problems. All was ok up to defining the nero object and obtain CDInfo but I'm not able to make nero firing OnDriveStatusChanged event. My program says: ----------------------------------------------------------------- import win32com.client as COM ... self.nero = COM.Dispatch("Nero.Nero") ... drives = self.nero.GetDrives(COM.constants.NERO_MEDIA_CD) ... self.burner.CDInfo(COM.constants.NERO_READ_CD_TEXT) ... # loop for wait for end of gathering CD infos event ... ## where self.burner is choosen by the user among "drives" ## if drive.DevType == COM.constants.NERO_SCSI_DEVTYPE_WORM ... self.cdInfo = COM.DispatchWithEvents(self.burner, infoEvent) ... class infoEvent: def __init__(self): ...self.evDoneCDInfo = win32event.CreateEvent(None, 0, 0, None) def OnDoneCDInfo (self, PyDispatchObj): ... # read CD info from PyDispatchObj ...win32event.SetEvent(self.exDoneCDInfo) ----------------------------------------------------------------- This works fine. The OnDoneCDInfo event is fired up and trapped by my infoEvent class. Now I'm trying to make NeroDrive trigger the OnDriveStatusChanged event but it doesn't seem to work in any way. Please help me, if someone is more familiar with event treatment in python and knows more deeply how to manage NeroCOM objects. Thank you. |
| | |
| | #2 (permalink) |
| New on Forum Join Date: Feb 2008
Posts: 3
| Re: NeroCOM events and wxPython, need help Pardon, the correct sequence is: ----------------------------------------------------------------- import win32com.client as COM ... self.nero = COM.Dispatch("Nero.Nero") ... drives = self.nero.GetDrives(COM.constants.NERO_MEDIA_CD) ... self.burner.CDInfo(COM.constants.NERO_READ_CD_TEXT) ... ## where self.burner is choosen by the user among "drives" ## if drive.DevType == COM.constants.NERO_SCSI_DEVTYPE_WORM ... self.cdInfo = COM.DispatchWithEvents(self.burner, infoEvent) ... # loop for wait for end of gathering CD infos: evDoneCDInfo event ... class infoEvent: def __init__(self): ...self.evDoneCDInfo = win32event.CreateEvent(None, 0, 0, None) def OnDoneCDInfo (self, PyDispatchObj): ... # read CD info from PyDispatchObj ...win32event.SetEvent(self.evDoneCDInfo) ----------------------------------------------------------------- Thank you. |
| | |
| |
| |
![]() |
| If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here |
| Bookmarks |
| Tags |
| events, nerocom, python |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NeroCOM events in C , please some advice | donPanucci | Nero SDK Discussion Forum | 3 | 18-01-2005 00:56 |
| Events NeroCom in C++ Builder | Tors | Nero SDK Discussion Forum | 5 | 05-05-2004 19:02 |
| Nerocom + c# + firing events to display | Curtis | Nero SDK Discussion Forum | 5 | 26-03-2004 17:58 |
| Delphi 7 and NeroCOM Events | GMTyrael | Nero SDK Discussion Forum | 5 | 17-02-2004 13:53 |
| NeroCOM and .NET and events | LouClarkso | Nero SDK Discussion Forum | 7 | 19-12-2003 12:03 |