Jump to content
Macro Express Forums

Parsing To An Ini File


jrobbins
 Share

Recommended Posts

I have written macro that will parse out bits and pieces of a log file that is constantly written to by an application. The macro is using text file begin process to step through the file and pull out the new information. The macro works great, but as the time goes on it gets slower and slower because the log file gets bigger and bigger. Is there any way to just check lines of the log file that haven't already been checked and ignore the others?

 

Thanks in advance,

Jimmy

Link to comment
Share on other sites

Sure, keep track of the number of lines. On first run I would count the total number of lines and record that in the registry using Write Registry Integer. But start at 1 instead of zero. Then each time the macro runs do a Read Registry Integer, increment and start at that point. Then each subsequent time it runs increment that counter and write it back to the registry. You might also consider adding a file size and/or creation date check to ensure a new log file hasn’t been created.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...