question on interacting with other application

Hello group,

Here is what I’m trying to do.

  1. A listbox is created with bunch of text strings;
  2. When user selects one item, an Excel application window will be activated (using the ActiveX and DLL versions of AutoIt called AutoItX) and the selected string will be put into Excel’s cell.

It almost works (maybe not even close, i don’t know) except the step 2 won’t happen until the frame (or the wxPython application) is closed. What I’d like to see is the listbox floating on top of Excel window, and whenever user selects an item, the text string will be sent to one of Excel’s cells.

How can I achieve that? Thanks for your help!

···

  • wcc

Here's some code that does basically what you want, using win32com to
drive Excel. I have no idea how AutoIt works, but running Excel via
com isn't that hard.

e.py (1.13 KB)

···

On 12/29/06, wccppp <wccppp@gmail.com> wrote:

Hello group,

Here is what I'm trying to do.

1. A listbox is created with bunch of text strings;
2. When user selects one item, an Excel application window will be activated
(using the ActiveX and DLL versions of AutoIt called AutoItX) and the
selected string will be put into Excel's cell.

It almost works (maybe not even close, i don't know) except the step 2 won't
happen until the frame (or the wxPython application) is closed. What I'd
like to see is the listbox floating on top of Excel window, and whenever
user selects an item, the text string will be sent to one of Excel's cells.

How can I achieve that? Thanks for your help!

Thanks for your help Chris. With the code you posted, I can input strings in Excel’s cells. But that does not activate the Excel application. User needs to see the Excel window after each input and the wxPython dialog needs to be floating on top of the Excel window.

···

  • wcc