【已解决】请教下怎么取出系统日志????
本帖最后由 fhqbbfcu2050 于 2012-6-15 11:39 编辑请问AU3能取出系统日志么???求大大支援 不是有eventlog udf吗 回复 1# fhqbbfcu2050 #include <GuiConstantsEx.au3>
#include <EventLog.au3>
Global $iMemo
_Main()
Func _Main()
Local $hEventLog, $aEvent
; 创建 GUI
GUICreate("EventLog", 400, 300)
$iMemo = GUICtrlCreateEdit("", 2, 2, 396, 300, 0)
GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
GUISetState()
; 读取最近的事件记录
$hEventLog = _EventLog__Open("", "Application")
$aEvent = _EventLog__Read($hEventLog, True, False) ; 读取最后一条事件
;~ $hEventLog = _EventLog__Open("", "System")
;~ $aEvent = _EventLog__Read($hEventLog)
;~ $aEvent = _EventLog__Read($hEventLog, True, False)
MemoWrite("Result ............: " & $aEvent)
MemoWrite("Record number .....: " & $aEvent)
MemoWrite("Submitted .........: " & $aEvent & " " & $aEvent)
MemoWrite("Generated .........: " & $aEvent & " " & $aEvent)
MemoWrite("Event ID ..........: " & $aEvent)
MemoWrite("Type ..............: " & $aEvent)
MemoWrite("Category ..........: " & $aEvent)
MemoWrite("Source ............: " & $aEvent)
MemoWrite("Computer ..........: " & $aEvent)
MemoWrite("Username ..........: " & $aEvent)
MemoWrite("Description .......: " & $aEvent)
_EventLog__Close($hEventLog)
; 循环直到用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main
; 写入一行到 memo 控件
Func MemoWrite($sMessage)
GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite 谢了,学习了,不错..... 再顺便问下怎么移动分类????? 重回两次,买道具移动不会封吧.... 回复 5# fhqbbfcu2050
编辑标题栏,添加 【已解决】。 没弄懂怎么逐条读取
页:
[1]