![]() |
|
|
|
#1
|
|||
|
|||
|
Hi,
Can someone tell me the equivalent of the following wbscript code in Delphi. ==================================== Set StdOut = WScript.StdOut Set StdIn = WScript.StdIn Dim InputString Do While Not StdIn.AtEndOfStream InputString = StdIn.ReadLine Loop ==================================== Regards,Suat. |
|
#2
|
|||
|
|||
|
Code:
var
File : TextFile;
Input : string;
Buffer : String;
begin
AssignFile(File, 'c:\test.txt'); { File selected }
Reset(File); {Opens for read}
Buffer := '';
While not Eof(File) do {Do until End of File marker}
begin
Readln(File, Input);
Buffer := Buffer + Input + ' '+chr(13);{Fills Buffer and adds CRs}
end;
CloseFile(File);
end;
|
|
#3
|
|||
|
|||
|
Hi,
Thanks for your answer but What I want is exactly this: There is program (I didn't write) which takes a parameter to send its output. When I read the manual of this program it says," The program pumps the data to the program you specify". There is also a little VB script(I wrote in the first message) to achieve this. I then wrote a program resembling yours but it didn't work. This thirt party program uses our program as standart output. So I have to use this program as standart input. Or something else? Regards,Suat. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|