ExecuteProcess

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ExecuteProcess

Darius Blaszyk
I'm using ExecuteProcess to run a commandline application. This application
returns information to stdout. I have tried to pipe this to a file, but
unfortunately this does not work. I keep getting a message like: "error
resolving case of '>'"
Is ExecuteProcess not capable of handling pipes, is there a workaround, or
an alternative??

Darius Blaszijk


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ExecuteProcess

L505
| I'm using ExecuteProcess to run a commandline application. This application
| returns information to stdout. I have tried to pipe this to a file, but
| unfortunately this does not work. I keep getting a message like: "error
| resolving case of '>'"
| Is ExecuteProcess not capable of handling pipes, is there a workaround, or
| an alternative??


Have you checked out AssignStream.  It works well.. might be available on *nix
only though.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ExecuteProcess

Darius Blaszyk
> Have you checked out AssignStream.  It works well.. might be available on
*nix
> only though.

I will check it, although I "prefer" a platform independent aproach.

Darius Blaszijk


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ExecuteProcess

L505
| I will check it, although I "prefer" a platform independent aproach.
 

Same .. if anyone knows of other ways to pipe, let us know.

Lars

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ExecuteProcess

Vincent Snijders
In reply to this post by Darius Blaszyk
Darius Blaszijk wrote:
> I'm using ExecuteProcess to run a commandline application. This application
> returns information to stdout. I have tried to pipe this to a file, but
> unfortunately this does not work. I keep getting a message like: "error
> resolving case of '>'"
> Is ExecuteProcess not capable of handling pipes, is there a workaround, or
> an alternative??
>

The cross platform solution for fpc is using TProcess.
Since it is asked so many times, there is even a wiki page about it:
http://lazarus-ccr.sourceforge.net/kb/index.php/Executing_External_Programs

Vincent.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ExecuteProcess

Michael Van Canneyt
In reply to this post by L505


On Thu, 28 Jul 2005, L505 wrote:

> | I will check it, although I "prefer" a platform independent aproach.
>  
>
> Same .. if anyone knows of other ways to pipe, let us know.

Use TProcess. Works currently on windows and unixes.
See the Lazarus IDE sources for ways how to use it.

Michael.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal