|
-
Jan 23rd, 2000, 05:14 PM
#1
Thread Starter
Frenzied Member
I am writing a fairly trival program which will run in a batch file (in a DOS window so vb run files are available)
How do I output text to the dos window(stdout) and is it possible to put errors to stderr?
Next, is it possible to seperate stdout and stderr in a batchfile like you can in a UNIX Shell Script
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 23rd, 2000, 09:48 PM
#2
Addicted Member
You can redirect a standard output to the file and then read and display the output data from the Visual Basic application.
Write the .bat file
d:\test.bat
------------------
dosapp.exe > d:\results.txt
------------------
Call from VB
Shell ("d:\test.bat")
------------------
smalig
[email protected]
http://vbcode.webhostme.com/
-
Jan 23rd, 2000, 09:57 PM
#3
Thread Starter
Frenzied Member
No, non, nein ....
That's not what I meant!
What I wanted to do was run a VB app in a batch file outputting to stdout (the dos window) so the output could then be re-directed.
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 23rd, 2000, 10:02 PM
#4
So Unbanned
in the bat file put something like:
C:\MyProg.exe, stdout(where stdout is an operation the program will keep)
then in the prog put:
Code:
appactivate "ms-dos prompt"
sendkeys "keys sent to the DOS window"
Hope this helps!
------------------
DiGiTaIErRoR
-
Jan 23rd, 2000, 11:22 PM
#5
Thread Starter
Frenzied Member
Here is a C++ program
Code:
#include <iostream.h>
void main()
{
cout << "Hello World" << endl;
}
When compiled and executed in a DOS window, "Hello World" is displayed on the command line.
How can I do the same in VB?
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 23rd, 2000, 11:35 PM
#6
Guru
This probably won't help, but what the hell
http://www.vb-world.net/articles/console/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|