Sign in to follow this  
Followers 0
blender

How do I creeat log file using autoIt?

6 posts in this topic

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!

Share this post


Link to post
Share on other sites



Well, I always use _FileWriteLog() and works fine for me.

Share this post


Link to post
Share on other sites

Just use the FileWriteLine("Filename", text) which will append each record to the file and close it or _FileWriteLog() udf

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

File.au3

SciTe tells you that when you type the function + it's in the help file :P

Share this post


Link to post
Share on other sites

Thank you so much! I'll check the help file from now :P

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0