<p dir="ltr">Thanks Sven<br>
I've now switched to a memo and thats worked</p>
<div class="gmail_quote">On 5 Nov 2013 15:33, "Sven Barth" <<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Am 05.11.2013 14:48, schrieb Richard
Mace:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi All,<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have got the
following code from the wiki for creating and reading from an
external process. Effectively, I want to capture all of the
output from the process "handle.exe", into a StringList so
that I can read it to make sure that everything went OK,
however, when I run the following code, I am getting a
"RunError(103) on the line: WriteLn('-- Going to run: ' +
OurCommand);<br>
<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Any ideas what
I'm doing wrong please?<br>
</div>
</div>
</blockquote>
Is your application (that one which calls handle.exe) compiled as a
GUI application or not? (check in the project settings) If it is
compiled as a GUI application then disable the option and recompile.
An additional console window should now appear when you run the
application from within Lazarus in which you'll see your output.<br>
Reason: on Windows the I/O is closed on startup if the application
is compiled as a GUI program (Delphi compatible)<br>
Alternatively you could use a Memo. Either you directly use
YourMemo.Add('...') or if you want to keep using Writeln, I have a
unit sent somewhere on the mailing list some days ago that allows
you to assign a memo or edit to a TextFile so that you could use
either Writeln(YourFile, '...') or you could override "Output" so
that you could keep using Writeln('...').<br>
<br>
Regards,<br>
Sven<br>
</div>
<br>--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
<br></blockquote></div>