diikee Posted July 11, 2008 Posted July 11, 2008 (edited) #include <IE.au3> #include <File.au3> $file = FileOpen("logfile_" &@MDAY &@MON &@HOUR &@MIN &"_" &$ip & ".txt", 10) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, "SQA Testing Started at: " & @MDAY & @MON & @YEAR & @HOUR & @MIN & @CRLF) FileWrite($file, "SQA Testing Finished at: " & @MDAY & @MON & @YEAR & @HOUR & @MIN & @CRLF) FileClose($file) what am I missing????? Edited July 11, 2008 by diikee
Kerros Posted July 11, 2008 Posted July 11, 2008 (edited) I believe that your missing a path. I also have to assume that $ip is declared somewhere. Try. $ip = 'Something' $file = FileOpen(@scriptdir&"\logfile_" &@MDAY &@MON &@HOUR &@MIN &"_" &$ip & ".txt", 10) Edited July 11, 2008 by Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.
diikee Posted July 11, 2008 Author Posted July 11, 2008 It's creating the file but never writes anything to it
Developers Jos Posted July 11, 2008 Developers Posted July 11, 2008 Works fine here. 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.
diikee Posted July 11, 2008 Author Posted July 11, 2008 Mine comes out empty.....don't know how to explain it but it's 0 KB logfile_11071154_10.100.47.6.txt 0 bytes
Developers Jos Posted July 11, 2008 Developers Posted July 11, 2008 What are the returncode values for the FileWrite commands? 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.
diikee Posted July 11, 2008 Author Posted July 11, 2008 Jos, I actually waited for a few minutes and the file started getting populated.... .txt file Electronic Shutter is set to: fixed 1/8 sec Electronic Shutter is set to: fixed 1/5 sec Completed: Clicked on r console: Electronic Shutter is to: fixed 1/8 sec Electronic Shutter is to: fixed 1/5 sec Complete: Overlay text set to: $IMGCDBG 2 Complete: LightGrabber set to: 1x Light grabber is set to: 1x Light grabber set successfully Close oi Complete: LightGrabber set to: disabled Light grabber is set to: DISABLED Light grabber set successfully Close oi I got more log on the console than in the text file what might be causing the delay in writing to the file???
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