IDE Scripting with OLE/COM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IDE Scripting with OLE/COM

454 Views
frankc
Contributor I

I've leveraged the IDE Windows Automation Guide in the CW help folder and successfully created several OLE/COM scripts using Perl to automate CW v8.3. However we have unit tests that use the console output. My problem now is that I need to control the debugger, wait for the output to appear on the CW console, then capture that output to a file in order to pass it back to our build server.

 

Does someone have the commandID list for the OLE method DoCommand? In a very old forum there is a reference to the file CodeWarriorCommandNumbers.h in a Plugin SDK Com folder, however this no longer seems available (I think). According to the OLE viewer, the DoCommand is:


void DoCommand([in] long commandID);

 

Also, is there a place I can look for any other OLE interface tips on how to capture the console output? I haven’t found an obvious interface via the OLE/COM viewer for that.

 

Labels (1)
0 Kudos
1 Reply

317 Views
frankc
Contributor I

As an update for everyone, I eventually solved the problem by avoiding use of the IDE's console. We created a routine to send unit test debug messages out a serial port which was much easier to capture. Our basic automation process has become: Set flags in the code to enter Unit Test mode -> Start the IDE using scripts to run the code -> Capture Serial output looking for a conclusion -> Kill the IDE using Microsoft's tool PSKILL.exe. It's a little clunky and more invasive than I'd prefer, but it works. I'd still be curious if anyone gets the OLE method to work, but for us the work-around is acceptable.

0 Kudos