⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readini.vbs

📁 Apress - Managing Enterprise Systems With The Windows Script Host Source Code
💻 VBS
字号:
'readini.vbs
Dim dAccess

dAccess = ReadINI("e:\data.ini", "DateLastAccessed")

Function ReadINI(strINIFile, strKey)
 Dim objFSO, objTextFile, strLine

 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objTextFile = objFSO.OpenTextFile(strINIFile)

 'loop through each line of file and check for key value
 Do While Not objTextFile.AtEndOfStream
    strLine = objTextFile.ReadLine
    If Left(strLine, Len(strKey) + 1) = strKey & "=" Then
        ReadINI = Mid(strLine, InStr(strLine, "=") + 1)
    End If
 Loop

 objTextFile.Close

End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -