Sign in to follow this  
Followers 0
HeXetic

Finding errors in the Event Log

2 posts in this topic

I'm busy putting together a script that will run through the event log and find any errors in the past 24 hours but I'm stuck right at the start. I am able to read one record but how to you get it to move on to another.

Below is just a quick bit of code that I put together to experiment with.

#include <EventLog.au3>

$hEventLog = _EventLog__Open ("", "Application")
$Read = _EventLog__Read($hEventLog, True, False)

$Output = "Did you read the event: " & $Read[0] & @CRLF
$Output &= "The event log ID is : " & $Read[1] & @CRLF
$Output &= "Date and Time: " & $Read[2] & " " & $Read[3] & @CRLF
$Output &= "Error Type: " & $Read[7]

MsgBox(64, "Info", $Output)

Share this post


Link to post
Share on other sites



Ah never mind I figured it out you just have to run the _EventLog__Read function again and it will move on.

Share this post


Link to post
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
Sign in to follow this  
Followers 0