blender Posted November 22, 2007 Posted November 22, 2007 Hi, All My goal is to create a log file and log events while the script is running. I tried using FileWrite. But I found it won't write to the file until the script finishes running. So if my autoit script hangs, there will be nothing in my log file. I could use fileopen and fileClose to make it write the file. But this way, my script will have many redundant lines of code (fileOpen->FileWrite->FileClose->FileOpen->Filewrite->FileClose....). So is there a way to create a log file using autoit and make it write stuff to the file at real time without closing the file? Thanks!
Nahuel Posted November 22, 2007 Posted November 22, 2007 Well, I always use _FileWriteLog() and works fine for me.
Developers Jos Posted November 22, 2007 Developers Posted November 22, 2007 Just use the FileWriteLine("Filename", text) which will append each record to the file and close it or _FileWriteLog() udf 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.
blender Posted November 22, 2007 Author Posted November 22, 2007 Well, I always use _FileWriteLog() and works fine for me.Thanks for the reply. Can you tell me which file I should include before I can use the function? Thanks.
Nahuel Posted November 22, 2007 Posted November 22, 2007 File.au3SciTe tells you that when you type the function + it's in the help file
blender Posted November 22, 2007 Author Posted November 22, 2007 Thank you so much! I'll check the help file from now
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