Differences

This shows you the differences between two versions of the page.

Link to this comparison view

autoitlogging [2014/10/26 01:52] (current)
Line 1: Line 1:
 +== AutoIt Logging ==
 +<​code>​
 +
 +# Logging.Au3
 +#include <​Date.au3>​
 +
 +Func Logging($msg)
 + $TextFileName = "​SumsLog.txt"​
 + $timestamp = _Now()
 + $FileContents = String($timestamp & ': ' & $msg & @CRLF)
 + FileWrite($TextFileName,​ $FileContents)
 +EndFunc
 +
 +Func Llog($module,​ $line, $msg)
 + $timestamp = _Now()
 + $FileContents = String($timestamp & ': [' & $module & '] line:' & $line & ' ' & $msg & @CRLF)
 + FileWrite($TextFileName,​ $FileContents)
 +EndFunc
 +
 +
 +Logging('​line 1')
 +Logging('​Line 2')
 +
 +Logging('​Line 3')
 +Logging('​Time now is : ' & _Now())
 +Llog(@ScriptName,​ @ScriptLineNumber,​ "line 5")
 +
 +</​code>​
 +
 +----
 +
 +  * [[AutoIt3|Back to AutoIt]]
  
autoitlogging.txt ยท Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0