Returns a Boolean value indicating whether the end of a line in an input stream has been reached.
object.AtEndOfLine |
Arguments
- object
-
StdIn text stream object.
Remarks
The AtEndOfLine property contains a Boolean value indicating whether the end of a line in an input stream has been reached. The AtEndOfLine property returns True if the stream pointer immediately precedes the end-of-line marker in an input stream, False if it does not. The StdIn, StdOut, and StdErr properties and methods work only when the script is run with CScript.exe. If the script is run with WScript.exe, an error occurs.
Example
The following samples will read a line of text from the keyboard and display whatever was typed when the end of the line is seen.
Visual Basic Script | Copy Code |
---|---|
Dim Input Input = "" Do While Not WScript.StdIn.AtEndOfLine Input = Input & WScript.StdIn.Read(1) Loop WScript.Echo Input |
JScript | Copy Code |
---|---|
var input = ""; while (!WScript.StdIn.AtEndOfLine) { input += WScript.StdIn.Read(1); } WScript.Echo(input); |