Jump to content

open log file?


 Share

Recommended Posts

I've searched this forum and I'm sure I'm missing it, but I'm looking for some code to jump start me in creating something that will open a log file (newest modified date) and scan for the word 'failed' or 'success' and be able to send an email depending on what it finds. I just need some examples to point me in the right direction.

Thanks for any insight, code, or ideas!

Link to comment
Share on other sites

I've searched this forum and I'm sure I'm missing it, but I'm looking for some code to jump start me in creating something that will open a log file (newest modified date) and scan for the word 'failed' or 'success' and be able to send an email depending on what it finds. I just need some examples to point me in the right direction.

Thanks for any insight, code, or ideas!

eh, what practical use does this have?
Link to comment
Share on other sites

unfortunately i dont have my other HDD so i cant post my hyper ultimate search script, so bear with this....help file sample ^^

$file = FileOpen("test.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

; Read in lines of text until the EOF is reached
While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
   if StringInStr($line,'failed') Then MsgBox(4096, "Test", "found failed")

Wend

FileClose($file)
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...