The usage of AtEndOfLine attribute under VBS
This article mainly explains "the usage of AtEndOfLine attribute under VBS". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of AtEndOfLine attribute under VBS".
In the TextStream file, return True; if the file pointer points to the end-of-line tag, otherwise return False if it is not read-only.
Object.AtEndOfLine
Object should be the name of the TextStream object.
Description
The AtEndOfLine attribute applies only to TextStream files that are opened as reads, otherwise an error will occur.
The following code illustrates how to use the AtEndOfLine property:
Function ReadEntireFile (filespec) Const ForReading = 1 Dim fso, theFile, retstring Set fso = CreateObject ("Scripting.FileSystemObject") Set theFile = fso.OpenTextFile (filespec, ForReading, False) Do While theFile.AtEndOfLine True retstring = theFile.Read (1) Loop theFile.Close ReadEntireFile = retstringEnd Function Thank you for your reading. This is the content of "the usage of AtEndOfLine attribute under VBS". After the study of this article, I believe you have a deeper understanding of the use of AtEndOfLine attribute under VBS. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!