18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

TextStream Object<br />

The <strong>VBScript</strong> TextStream object facilitates sequential access to a file<br />

TextStream Object Methods<br />

Properties Description<br />

Close Closes an open stream.<br />

Read Reads a specified number of characters from a stream.<br />

ReadAll Reads an entire stream.<br />

ReadLine Reads an entire line from a stream.<br />

Skip Skips a specified number of characters when reading a stream.<br />

SkipLine Skips the next line when reading a stream.<br />

Write Writes a specified string to a stream.<br />

WriteBlankLines Writes a specified number of newline characters to a stream.<br />

WriteLine Writes a specified string and newline character to a stream.<br />

TextStream Object Properties<br />

Properties Description<br />

AtEndOfLine True if the file pointer is be<strong>for</strong>e the end-of-line marker.<br />

AtEndOfStream True if the file pointer is at the end of the stream<br />

Column The column number of the current character in the stream.<br />

Line The current line number of the stream.<br />

<strong>VBScript</strong> TextStream Object<br />

Description: The <strong>VBScript</strong> TextStream object<br />

Usage: oTextStream.{property | method}<br />

Return: Depends on Property or Method used<br />

Remarks<br />

Example: In the following code, a is the TextStream object returned by the CreateTextFile method on the<br />

FileSystemObject:<br />

Set fs = CreateObject("Scripting.FileSystemObject")<br />

Set a = fs.CreateTextFile("c:\testfile.txt", True)<br />

a.WriteLine("This is a test.")<br />

a.close<br />

38 <strong>InduSoft</strong>, Ltd.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!