|
-
May 24th, 2005, 11:06 AM
#1
Thread Starter
Junior Member
Catching CMD Pipes? [ RESOLVED ]
Hey, Im working on a speech program that takes a defined file and reads it. But im trying to keep it from being hardcoded, Ive got it to work with Command Line Args, but Im wanting to create a batch file where I define the file to be read from there. Ive got the CMD line need
type C:\test.txt|Speech.exe
but I cant find a way to have my program open up and recieve the Standard IO. Anyone have any tips?
Last edited by DustinH; May 24th, 2005 at 05:22 PM.
-
May 24th, 2005, 04:11 PM
#2
Re: Catching CMD Pipes?
Play a bit with:
VB Code:
Dim str As System.IO.StreamReader = New System.IO.StreamReader(Console.OpenStandardInput())
Debug.WriteLine(str.ReadToEnd())
You don't need to explicitly open the stream.
-
May 24th, 2005, 05:22 PM
#3
Thread Starter
Junior Member
Re: Catching CMD Pipes?
Alrighty, that helped alot man! Finally Got it, Thanks a million!
Here's the code I ended up with just incase someone else hits this problem.
VB Code:
Dim str As System.IO.StreamReader = New System.IO.StreamReader(Console.OpenStandardInput())
Console.Write(strSpeak)
strSpeak = str.ReadToEnd()
txtSpeak.Text = strSpeak
Dim Voice As SpeechLib.SpVoice
Voice = New SpeechLib.SpVoice
Voice.Speak(strSpeak, SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync)
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
|