VBS教程:屬性-AtEndOfLine 屬性
更新時間:2006年11月16日 00:00:00 作者:
AtEndOfLine 屬性
TextStream 文件中,如果文件指針指向行末標記,就返回 True;否則如果不是只讀則返回 False。
object.AtEndOfLine
object 應(yīng)為 TextStream 對象的名稱。
說明
AtEndOfLine 屬性僅應(yīng)用于以讀方式打開的 TextStream 文件,否則會出現(xiàn)錯誤。
下列代碼舉例說明如何使用 AtEndOfLine 屬性:
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
相關(guān)文章
VBS 腳本不能運行 提示W(wǎng)indows無法訪問指定設(shè)備路徑或文件
Windows無法訪問指定設(shè)備路徑或文件,您可能沒有合適的權(quán)限訪問這個項目.2009-10-10
關(guān)于vbs 生成靜態(tài)頁面過程中出現(xiàn)的問題
訪問某個aspx頁面,然后把服務(wù)器返回的頁面以filestream 的形式保存為html格式,接下來將介紹實現(xiàn)代碼2012-12-12
VBS教程:函數(shù)-SetLocale 函數(shù)
VBS教程:函數(shù)-SetLocale 函數(shù)...2006-11-11

