zoukankan      html  css  js  c++  java
  • QTP 新建日志

    '    Const Reading=1,Writing=2,Appending=8
    '    Set Fso=CreateObject("Scripting.FileSystemObject")
    '    Dim txtPath
    '    a=DATE()
    '    Datetime = date
    '    Parameter = Array("yyyy","m","d")
    '    For Each P In Parameter
    '        Temp = DatePart(P,Datetime)
    '        If Len(Temp) = 1 Then
    '            Temp = "0"&Temp
    '        End If
    '        strTime = strTime & Temp
    '    Next
    '    c = strTime
    '    MsgBox c
    '    txtPath="E:Log"+c+".txt"
    '    msgbox txtPath
    '    If Fso.FileExists(txtPath) then
    '        Set logFile=Fso.OpenTextFile(txtPath,8,true)
    '        logFile.WriteLine(words)
                            
    '    else
    '        Set logFile=Fso.CreateTextFile(txtPath,2,true)
    '        logFile.WriteLine(words)
    '    End if
            
    '    logFile.close
    '    Set logFile=Nothing
    '    Set Fso=Nothing    
    'End Function

    Public Function WritLog(words)
        Dim Fso
        Const Reading=1,Writing=2,Appending=8
        Set Fso=CreateObject("Scripting.FileSystemObject")
        Dim txtPath
    '    msgbox a    
        c=FormatDateTime(date,1)
    '    msgbox c
        txtPath="E:Log"+c+".txt"
    '    msgbox txtPath
        If Fso.FileExists(txtPath) then
            Set logFile=Fso.OpenTextFile (txtPath,8,false)
            logFile.WriteLine(words)                        
        else
            Set logFile=Fso.CreateTextFile(txtPath,2,false)
            logFile.WriteLine(words)
        End if        
        logFile.close
        Set logFile=Nothing
        Set Fso=Nothing    
    End Function

  • 相关阅读:
    https 证书
    js 压缩
    身份证认证
    在 Visual Studio 2015 中关闭系统级的 Runtime Exceptions
    在 Visual Studio 2015 中关闭 Browser Link
    List<T>.ForEach()的使用
    使用Microsoft.Practices.EnterpriseLibrary.Validation.dll验证类成员
    jQuery.filter()的强大功能
    jQuery Checkbox Selected
    Get SQL String From Query Object In Entity Framework
  • 原文地址:https://www.cnblogs.com/hgfg331/p/3526623.html
Copyright © 2011-2022 走看看