WriteBlankLines Method (Windows Script Host)

Sends a specified number of blank lines (newline characters) to an output stream.

                      object.WriteBlankLines(intLines) 

Arguments

  • object
    StdOut or StdErr text stream objects.

  • intLines
    Integer value indicating the number of blank lines you want to write to the stream.

Remarks

Calling the WriteLine method without supplying the strText argument is equivalent to calling WriteBlankLines(1). The StdIn, StdOut, and StdErr properties and methods work when running the script with the CScript.exe host executable file only. An "Invalid Handle" error is returned when run with WScript.exe.

Example

The following code demonstrates the WriteBlankLines method.

Dim StdIn, StdOut
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut

Do While Not StdIn.AtEndOfStream
     str = StdIn.ReadLine
     StdOut.Write "Line " & (StdIn.Line - 1) & ": " & str
     StdOut.WriteBlankLines 1
Loop
var stdin = WScript.StdIn;
var stdout = WScript.StdOut;

while (!stdin.AtEndOfStream)
{
     var str = stdin.ReadLine();
     stdout.Write("Line " + (stdin.Line - 1) + ": " + str);
     stdout.WriteBlankLines(1);
}

Applies To:

StdErr Property (WScript)| StdOut Property (WScript)

See Also

Reference

WriteLine Method (Windows Script Host)

TextStream Object