Alright... i'm looking for some pro assistance on this basic problem.
I've got a text file I want to process. It is a running log accessed by another application. When key words appear I want specific commands to occur.
The log file from the other application does not clear itself. It also is held active by the application. So I start my macro by copying the file to another name.
LOGFILE.txt becomes LOG2.TXT. In summation the basic idea of the macro is below.
copy file logfile.txt log2.txt
I process log2.txt
if variable t1 contains "xyz"
text box display "it works"
end if
end process
delete file log2.txt
Meanwhile the LOGFILE.txt continues to grow with new data. When I run the macro again it processes the entire log file.
What I want it to do is process the last LINE of the log file. The log file is not a CSV, or TAB delimited file. It's essentially a basic text document... that is... SPACE delimited.
What I'd love to do is take the last line and enter EACH space delimited section into a T1, T2, T3 variable. So if the text file looked like this:
Hello My Name Is Julio123
My Brain hurts because I have too many pets.
If my macro is searching for BRAIN it will work. But as time goes on there may be more lines and the macro will look like this.
Hello My Name Is Julio123
My Brain hurts because I have too many pets.
Since yesterday I got a new job.
Now the macro will still trigger but I don't want it to. I want it to only process the LAST line or Row.
Ideally placing each word into a different %T%.
About 11 years ago I was using macro express do do this. I remember putting the entire line into a string. I can't for the life of me remember how I did this and of course I don't have my old macro.
Anyone have any ideas?