Processing constent stream of information from txt file

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
L40P
Posts: 19
Joined: 05 Jul 2016, 15:49

Processing constent stream of information from txt file

21 Apr 2017, 05:11

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?
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Processing constent stream of information from txt file

21 Apr 2017, 07:56

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....
User avatar
L40P
Posts: 19
Joined: 05 Jul 2016, 15:49

Re: Processing constent stream of information from txt file

21 Apr 2017, 10:31

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
just me
Posts: 9453
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Processing constent stream of information from txt file

21 Apr 2017, 10:59

Any reason why you want to process the same information frequently?
User avatar
L40P
Posts: 19
Joined: 05 Jul 2016, 15:49

Re: Processing constent stream of information from txt file

01 May 2017, 06:52

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, scriptor2016 and 279 guests