Page 1 of 1

Processing constent stream of information from txt file

Posted: 21 Apr 2017, 05:11
by L40P
Hello AHK Community,
I have some software that constantly puts information in a txt file that I want to process using AHK.

Code: Select all

FileDelete, Filtered.txt
Loop, Read, log.txt, Filtered.txt
{
	Loop, Parse, A_LoopReadLine, %A_Space%
	{
		FileAppend, %A_LoopField%`n, Filtered.txt
	}
}
This is the code I wrote to separate the information (separated by spaces and always three bits of information per line)

My question is: How can I adjust this code so it processes the constent stream of information and deletes already processed information?
A firefox add-on (HTTP request logger) I have running constantly puts all http requests into the log.txt. Can AHK and Firefox simultaneously edit and read the txt file?

Re: Processing constent stream of information from txt file

Posted: 21 Apr 2017, 07:56
by TheDewd
I attempted to modify the Firefox Add-on XPI file to add a fourth bit of information (timestamp) that could be used by AutoHotkey, however it appears that Firefox now required all XPI files to be signed or the installation is rejected. Hmmm....

Re: Processing constent stream of information from txt file

Posted: 21 Apr 2017, 09:48
by guest3456
Search for AHK Tail() function

Re: Processing constent stream of information from txt file

Posted: 21 Apr 2017, 10:31
by L40P
guest3456 wrote:Search for AHK Tail() function
I don't think that helps me since the Add-On always puts new information at the end of the file and I want to process it from the top at the same time. But thanks anyway

Re: Processing constent stream of information from txt file

Posted: 21 Apr 2017, 10:59
by just me
Any reason why you want to process the same information frequently?

Re: Processing constent stream of information from txt file

Posted: 01 May 2017, 06:52
by L40P
just me wrote:Any reason why you want to process the same information frequently?
Not the same information. I want to process every line on its own from the top, then delete it and process the next line. Because the Add-On puts its information at the end of the file.