Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Scripting
Windows Script Host
 Skip Method (Windows Script Host)

  Switch on low bandwidth view
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
Windows Script Host
Skip Method (Windows Script Host)

Skips a specified number of characters when reading from an input text stream.

object.Skip(characters) 
object

StdIn text stream object.

characters

Integer value indicating the number of characters you want to skip.

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. The position pointer moves forward by the number of characters (bytes) specified in the argument characters. You cannot use the Skip method to skip backwards through a file (negative character values are not supported). The Skip method is limited to the open for reading mode only (you cannot skip a specified number of characters when writing to an output stream).

The following code uses the Skip method to jump over the first character in a text stream, read a line from the keyboard, and write it to the StdOut text stream.

WScript.StdIn.Skip 1
Input = WScript.StdIn.ReadLine
WScript.StdOut.Write Input
JScript
WScript.StdIn.Skip(1);
Input = WScript.StdIn.ReadLine();
WScript.StdOut.Write(Input);

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker