Re: Event handling for COM object with win32com (pywin32)

2014-06-22 Thread peter . balazovic
On Sunday, June 22, 2014 12:09:51 PM UTC+2, Chris Angelico wrote: > On Sun, Jun 22, 2014 at 7:15 PM, wrote: > > > This code works on python console but there is no event fired. > > > > > class fmstrEvents(object): > > > ... def OnRecroderDone(self): > > > ... print "

Event handling for COM object with win32com (pywin32)

2014-06-22 Thread peter . balazovic
Dears, I have a problem with firing Events and event handling on COM object. This code works on python console but there is no event fired. >>> class fmstrEvents(object): ... def OnRecroderDone(self): ... print "Hello OnRecroderDone" >>> import win32com.client >>> fm = win32

Re: comtypes

2014-06-21 Thread peter . balazovic
I uses pywin32 >>> import win32com.client >>> fm = win32com.client.Dispatch("MCB.PCM") >>> fm.ReadVariable('dwt') (True, 0.0250037252903, u'0.025', u'') and I am getting it OK. Now I am trying to add and register event handler and no luck yet :( >>> ev = win32com.client.WithEvents(fm, evnt

Re: comtypes

2014-06-21 Thread peter . balazovic
Hmm, I did that - oleviewer says [id(0x60020002)] HRESULT ReadVariable( [in] VARIANT bsVar, [out, optional] VARIANT* vValue, [out, optional] VARIANT* tValue, [out, optional] VARIANT* bsRetMsg, [out, retval] VARIANT

comtypes

2014-06-21 Thread peter . balazovic
Dears, I am not sure I am at right place here. Now I've started working with comtypes 1.1.0 package within python 2.7.6.1. I have ActiveX COM object I want access and work with it. I do following >> from comtypes.client import CreateObject >> fm = CreateObject("MCB.PCM") >> dwt = fm.ReadVariab