autoit3 ie.au3 函数之——_FileWriteLog日志
2012-08-15 17:11
381 查看
例子:将日志添加到日志文件中,如果日志文件不存在,则自动生成日志文件。
#include <file.au3>
_FileWriteLog("日志文件.log", "日志内容", -1)
第一个参数为:日志文件的路径
最好的格式为路径+文件名、@ScriptDir
& "\my.log"
第二个参数为:日志内容
第三个参数为:标识符
默认情况下,日志显示在文件的最后一行,即标识符为:-1
详细介绍:
Writes current date,time and the specified text to a log file.
#Include <File.au3>
_FileWriteLog($sLogPath, $sLogMsg [, $iFlag = -1])
Parameters
Return Value
Remarks
None.
Related
FileOpen
Example
#include <file.au3>
;
_FileWriteLog(@ScriptDir
& "\my.log","Text 1")
;
_FileWriteLog(@ScriptDir
& "\my.log","Text 2")
#include <file.au3>
_FileWriteLog("日志文件.log", "日志内容", -1)
第一个参数为:日志文件的路径
最好的格式为路径+文件名、@ScriptDir
& "\my.log"
第二个参数为:日志内容
第三个参数为:标识符
默认情况下,日志显示在文件的最后一行,即标识符为:-1
详细介绍:
Writes current date,time and the specified text to a log file.
#Include <File.au3>
_FileWriteLog($sLogPath, $sLogMsg [, $iFlag = -1])
Parameters
$sLogPath | Path and filename of the file to be written to |
$sLogMsg | Message to be written to the log file |
$iFlag | [optional] Flag that defines if $sLogMsg will be written to the end of file, or to the begining. If $iFlag = -1 (default) $sLogMsg will be written to the end of file. If $iFlag <> -1 $sLogMsg will be written to begining of file. |
Return Value
Success: | 1 |
Failure: | 0 and set @error |
@Error: | 1 = Error opening specified file |
2 = File could not be written to |
Remarks
None.
Related
FileOpen
Example
#include <file.au3>
;
_FileWriteLog(@ScriptDir
& "\my.log","Text 1")
;
_FileWriteLog(@ScriptDir
& "\my.log","Text 2")
相关文章推荐
- autoit3 ie.au3 函数之——_IEDocGetObj
- autoit3 ie.au3 函数之——_IEDocInsertHTML
- autoit3 ie.au3 函数之——_IEBodyReadHTML、_IEBodyWriteHTML
- autoit3 ie.au3 函数之——_IEAction
- autoit3 ie.au3 函数之——_IEErrorHandlerDeRegister & _IEErrorHandlerRegister
- autoit3 ie.au3 函数之——_IEDocWriteHTML
- autoit3 ie.au3 函数之——_IEGetObjById、_IEGetObjByName
- autoit3 ie.au3 函数之——_IEBodyReadText
- autoit3 ie.au3 函数之——ControlClick
- autoit3 ie.au3 函数之——_IEAttach
- autoit3 ie.au3 函数之——_IEFormElementGetCollection & _IEFormGetCollection
- autoit3 ie.au3 函数之——_IECreate
- autoit3 ie.au3 函数之——_IEFormElementCheckBoxSelect & _IEFormGetObjByName
- autoit3 ie.au3 函数之——_IE_Example、_IE_Introduction
- autoit3 ie.au3 函数之——_IE_VersionInfo
- autoit3 ie.au3 函数之——_IECreateEmbedded
- autoit3 ie.au3 函数之——_IEErrorNotify
- AutoIt的IE相关函数
- AUTOIT IE.au3的介绍以及应用
- autoit3 ie.au3 介绍