Hi,
I am trying to send Ctrl+F to IEHtmlWindow programmatically using
the win32 Apis.
When I do this, I see a crash in _activex.pyd. I have built
a debug version of _activex.pyd. ( Setting break points revealed that, the
crash was happening because m_oleInPlaceActiveObject instance variable in
wxActive class was un-initialized.
The crash happens in wxActiveX::MSWTranslateMessage() in
wxActive.cpp )
I noticed that if I send Ctrl+F programmatically after manually
clicking on the IEHtmlWindow with the mouse, I am able to send the
key events successfully without a crash . (because manually clicking using the
mouse is somehow causing m_oleInPlaceActiveObject variable to be initialized)
So in order to fake a mouse click on the IEHtmlWindow , I
send mouse_events using win32 apis but this still causes a crash in _activex.pyd.
So how do I simulate the mouse click behavior successfully ?
Here the code I am using :
self.ie = wx.lib.iewin.IEHtmlWindow(…………)
self.ie.SetFocus()
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN , 10, 10,
0, 0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 10,10, 0,
0)
Thanks,
Aditya S.