Jump to content

Simple Error Log Maker


Coder_Noob
 Share

Recommended Posts

; Error Log Maker, © Elliot Harris, 05.
Run("Notepad")
WinWaitActive("Untitled -")
Send("!f s Error.log {enter}Y{backspace}{f5}: Error: " & @error; & ". !f s")
sleep(2000)
WinKill("Error", "")

This was one of my odd codes I had on my PC, this hasn't been tested :P (because i don't get many errors, because i make simple programs). Please test, comment :lmao:

Edited by Coder_Noob

Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Link to comment
Share on other sites

  • Developers

; Error Log Maker, © Elliot Harris, 05.
Run("Notepad")
WinWaitActive("Untitled -")
Send("!f s Error.log {enter}Y{backspace}{f5}: Error: " & @error; & ". !f s")
sleep(2000)
WinKill("Error", "")

This was one of my odd codes I had on my PC, this hasn't been tested :P (because i don't get many errors, because i make simple programs). Please test, comment :lmao:

dunno what you are trying here, but one thing you need to remember is that the @error macro will contain the returned Error of the last function which in this case is WinWaitActive().

If you are trying to create a Error log then you should look at the _FileWriteLog( $sLogPath, $sLogMsg ) UDF.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Have to agree with JdeB, I've used the _FileWriteLog many times which also time stamps each line in the log example:

#include <file.au3>

_FileWriteLog(@ScriptDir & "\Error.log","Error: " & @error")

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...