ITSky8 Posted May 13, 2008 Share Posted May 13, 2008 Hello! I know that AutoIT can create log file, but how to create the log file by date? e.g. log20080511.txt log20080512.txt log20080513.txt log20080514.txt etc. By using the System Time? How to do so? Link to comment Share on other sites More sharing options...
monoceres Posted May 13, 2008 Share Posted May 13, 2008 There are some nice macros available FileWrite("log"&@year&@mon&@mday&".txt","Logging something...") Soa 1 Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 13, 2008 Share Posted May 13, 2008 (edited) My preference is for _FileWriteLog() because it time-tags the entries for you: #include <File.au3> Global $sLogFile = StringTrimRight(@ScriptName, 4) & "_" & @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC & ".log" _FileWriteLog($sLogFile, "Script started from: " & @ScriptFullPath) ; ... _FileWriteLog($sLogFile, "Script complete, normal exit.") Edited May 13, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now