nyxx24 Posted January 1, 2010 Share Posted January 1, 2010 Hello, I understand and am able to get this code to work.. And I know @MDAY @MON @HOUR @MIN, are for the date & time But where it says line 1 I want it to write the date and time and I don't know how to put the two together.. Any assistance please.. $file = FileOpen("restartlog.txt", 1) ; Check if file opened for writing OK If $file = -1 Then Exit EndIf FileWrite($file, "Line1") FileClose($file) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 1, 2010 Developers Share Posted January 1, 2010 To concatenate use & 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 More sharing options...
nyxx24 Posted January 1, 2010 Author Share Posted January 1, 2010 To concatenate use & Sadly I had to google that word.. The code below simply produces a line of text that says: Restarted, @MDAY & @MON & @HOUR & @MIN I want something like Restarted 01 Jan 17:05 $file = FileOpen("c:\restartlog.txt", 1) ; Check if file opened for writing OK If $file = -1 Then Exit EndIf FileWrite($file, "Restarted, @MDAY & @MON & @HOUR & @MIN") FileClose($file) Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 1, 2010 Share Posted January 1, 2010 (edited) FileWrite($file, "Restarted, " & @MDAY & "/" & @MON & " " & @HOUR & ":" & @MIN) Edited January 1, 2010 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
nyxx24 Posted January 1, 2010 Author Share Posted January 1, 2010 Excellent.. 1 More question.. how do I make it write to the next line down each additional entry instead of: Restarted, 01/01 17:14Restarted, 01/01 17:16Restarted, 01/01 17:16 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 1, 2010 Developers Share Posted January 1, 2010 Helpfile is such a beautifull thing FileWriteLine() ? Jos 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 More sharing options...
nyxx24 Posted January 1, 2010 Author Share Posted January 1, 2010 Well I did use the helpfile to find fielwrite.. just shoulda read the next line.. This works.. thanks Guys! $file = FileOpen("c:\restartlog.txt", 1) ; Check if file opened for writing OK If $file = -1 Then Exit EndIf FileWriteLine($file, "Restarted, " & @MDAY & "/" & @MON & " " & @HOUR & ":" & @MIN & @CRLF) FileClose($file) Link to comment Share on other sites More sharing options...
JohnOne Posted January 1, 2010 Share Posted January 1, 2010 Perhaps _FileWriteLog() may better suit your purpose. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Angrysteel Posted January 4, 2010 Share Posted January 4, 2010 How about _Now()? 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