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