Getting output data

Discussion Forums discussion Getting output data

This topic contains 0 voices and has 3 replies.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
January 23, 2007 at 10:26 am #163

DHG
Member

Hello everybody,

I’ve a question regarding the output windows. I made a little scheme for a scripting language used by a game (the game itself didn’t provide any good editor tool, so I made a little scheme for the sake of easy editing and reading). Now, how the code is “compiled” (I know it isn’t real compiling to machinecode, but so it is described by them), is by providing the parser (an exe) the right parameters. So far no problem. Now, I wish to get the result of the parser in the main output window (otherwise you don’t know wheter it parsed good or with errors). Problem is that I don’t know how to get that output. I know that the parser produces a “results.txt” file in its directory with all the things it did and what the final result was. Now, the question is, how do I get that file’s contents? Just reading that file is enough. If I may add: the parser is closed source, so except for the results.txt file I can’t add any other means to get the results.

Even a batch file is good for me (first execute the parser then read the file, finally return it to PN) but I do not know how I return the data to the output window (or PN for that matter). Is this idea (or any other suggestion) doable? If yes, how do I do it?

Sorry if this question is too dumb, but from what I could find, I didn’t see anything usefull.

Thank you already for reading this far.

January 25, 2007 at 6:06 am #15253

simon
Key Master

I think you should be able to make a batch file that looks like this:

@echo off

mycompiler %1 %2 %3 %4 %5 %6 %7 %8 %9

type results.txt

and set it up as a tool with output capture.

That would then print the results after running the compiler and PN should catch that text in the output window. Let me know if that doesn’t work.

January 25, 2007 at 3:25 pm #15254

DHG
Member

It worked with type!

So, I assume, based on the batch file results, that whatever program get’s called, the stdout will get caught by PN and printed in the output window? Or am I wrong here? (Sorry for the questions, I’m not that familiar with PN’s inner working).

Annyway, thank you very much for the help.

January 25, 2007 at 9:02 pm #15255

simon
Key Master

Spot on, PN captures the stdout stream.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.