473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

capture output of external console application

4
Hello

I want to capture the Output of the External Console Application in my application and also want to send commands to External Console Application from my application.

Someone have some code for me? Please....Help me

Goje
Jan 10 '08 #1
5 1724
debasisdas
8,127 Expert 4TB
How you are connecting to the external application ?
Jan 10 '08 #2
r035198x
13,262 8TB
Hello

I want to capture the Output of the External Console Application in my application and also want to send commands to External Console Application from my application.

Someone have some code for me? Please....Help me

Goje
Generally

Expand|Select|Wrap|Line Numbers
  1. p.StartInfo.RedirectStandardOutput = true;
  2. p.Start();
  3. String output = p.StandardOutput.ReadToEnd();
Where p is your Process.
Jan 10 '08 #3
goje
4
Generally

Expand|Select|Wrap|Line Numbers
  1. p.StartInfo.RedirectStandardOutput = true;
  2. p.Start();
  3. String output = p.StandardOutput.ReadToEnd();
Where p is your Process.
thank you for your quick responce.

but i want to send the command to the external console application like f10,f4,
and capture the output in my application.
Jan 10 '08 #4
Plater
7,872 Expert 4TB
So you want to send keystrokes to an application, not console commands.

The Process object allows you to control the standard IN/OUT/ERROR streams, but unless you can get away with the two-byte character code that corrosponds to the F keys, you will have to use something like SendKeys() or maybe windows messages to simulate keystrokes.
Jan 10 '08 #5
goje
4
So you want to send keystrokes to an application, not console commands.

The Process object allows you to control the standard IN/OUT/ERROR streams, but unless you can get away with the two-byte character code that corrosponds to the F keys, you will have to use something like SendKeys() or maybe windows messages to simulate keystrokes.
Thank you for your reply
can you please show me the code example how to send keystrokes bcoz i am new to this kind of programming.
Jan 10 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Boba | last post by:
Hi, I'm programming a WinForm application. I would like to enter commands that will send output that will help me to locate bugs in the future. I know that there is a way to send output by...
2
by: John | last post by:
Hi, In Win App, I used Process class to start a new console appliaction, is it possible to capture the console output and display them in a textbox? Thanks very much! John
7
by: thompson_38 | last post by:
I have a COM object that wraps a console application. This console app outputs strings, using tprintf statements, throughout execution. I would like to capture that output from the console app...
4
by: George Lake | last post by:
Hi, How can I capture the text output of a console app? For example, I would like to capture the outpur of "qwinsta" Thanks.
2
by: Lonifasiko | last post by:
Hi group, I must launch from my Winforms application another application (.exe developed by the client) which response time sometimes can be more or less 30 seconds. I'm using ProcessManager...
0
by: jfigueiras | last post by:
>I have a problem with the module subprocess! As many other programs... I'm not sure what you mean by "non-standard file descriptors". The other program is free to open, read, write, etc any...
5
by: Muffin | last post by:
I am trying to capture the out put of a command line program. Let say ping or maybe better yet nslookup. I would like to launch and then capture all the output , redirect it I guess to a string...
3
by: TC | last post by:
I'm trying to debug a console application, but I can't see the console output. I've seen many references which say that console output is supposed to appear on the Output window when the...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I am using the following command to output my results to the Output window (for testing things out). Console.WriteLine ("Output") I'd like to clear the Output window of any previous output. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.