I doubt that the error messages are in a ICodeWarriorTextDocument, I think this interface is for text files only.
So if you want to get the error messages and you have the
CodeWarrior.CodeWarriorApp, then you first have to open the project, in the project find the build target,
then build the build target which returns a list of messages, then by exploring the messages you get to the individual errors.
Here's a very probably not working, not complete sample of how this looks like in perl.
With vbs its the same methods called with another syntax.
Just thought of the sample in HCS12 V4.7, could be this is what you are looking for.
I just zipped
"C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\(CodeWarrior_Examples)\Scripting\VBS"
Maybe you are lucky and the script for IDE 5.9 just works with your 5.6 ARM ide, I don't know.
Daniel
Code:
use Win32::OLE;...$CW = Win32::OLE->new("CodeWarrior.CodeWarriorApp");$project = $CW->OpenProject($projpath, 1, 0, 1); $target = $project->FindTarget("$targetname");my $messages = $target->BuildAndWaitToComplete();if ($messages->ErrorCount > 0){ my $errors = $messages->Errors();