Jump to content
Sign in to follow this  
blender

How do I creeat log file using autoIt?

Recommended Posts

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

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

Jos

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

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  

×
×
  • Create New...