Jump to content

Question about events in eventlog.

Recommended Posts

I have been looking on topics here to find some way to have a program/script monitor eventlogs in real time, but had come up short.

Any one have any idea where to look or id there are some api or something that can be used to pick up these in real time and not scan the logfiles every x min/sec?


Link to comment
Share on other sites

Hi, maybe you can read the file really fast, each 100ms or something, and that would be almost realtime.

But what do you mean with monitor? do you mean, to show new text being added to the log?


Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to comment
Share on other sites

  • Moderators

Unfortunately, I don't think you can do this in AutoIt without looking at the log. There are a couple open source projects that do it in other languages, if you're just looking to resolve an issue (see link below)


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

i found this witch i think i can put in a loop, what du u guys think?

to have in in real time i realise isent neccesary, in the end it will generate a mail and if more then 20 or so "stop".

ignore the wrong Do statement :)


Global $iMemo


Func _Main()
Local $hEventLog, $aEvent

; Create GUI
GUICreate("EventLog", 400, 300)
$iMemo = GUICtrlCreateEdit("", 2, 2, 396, 300, 0)
GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")

; Read most current event record
$hEventLog = _EventLog__Open("", "System")
$aEvent = _EventLog__Read($hEventLog, True, False) ; read last event
;~ $hEventLog = _EventLog__Open("", "System")
;~ $aEvent = _EventLog__Read($hEventLog)
;~ $aEvent = _EventLog__Read($hEventLog, True, False)
If $aEvent[8]="Error" Or $aEvent[8]="Fel" Then
ConsoleWrite("Result ............: " & $aEvent[0]& @CRLF)
ConsoleWrite("Record number .....: " & $aEvent[1]& @LF)
ConsoleWrite("Submitted .........: " & $aEvent[2] & " " & $aEvent[3]& @LF)
ConsoleWrite("Generated .........: " & $aEvent[4] & " " & $aEvent[5]& @LF)
ConsoleWrite("Event ID ..........: " & $aEvent[6]& @LF)
ConsoleWrite("Type ..............: " & $aEvent[8]& @LF)
ConsoleWrite("Category ..........: " & $aEvent[9]& @LF)
ConsoleWrite("Source ............: " & $aEvent[10]& @LF)
ConsoleWrite("Computer ..........: " & $aEvent[11]& @LF)
ConsoleWrite("Username ..........: " & $aEvent[12]& @LF)
ConsoleWrite("Description .......: " & $aEvent[13]& @LF)

; Loop until user exits

EndFunc ;==>_Main

; Write a line to the memo cont
Edited by lgvlgv
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...