Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, NeroCOM events and wxPython, need help at International Chat: Software related forum; 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.


Reply
 
Thread Tools
Old 21-02-2008   #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.
Kotekino is offline   Reply With Quote
Old 22-02-2008   #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.
Kotekino is offline   Reply With Quote
 
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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


All times are GMT +2. The time now is 21:12.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0