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 "
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
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
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
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