Processing constent stream of information from txt file

Get help with using AutoHotkey and its commands and hotkeys
User avatar
L40P
Posts: 14
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] [Download] (Unbenannt.ahk)GeSHi © Codebox Plus

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?
TheDewd
Posts: 807
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....
guest3456
Posts: 2084
Joined: 09 Oct 2013, 10:31

Re: Processing constent stream of information from txt file

21 Apr 2017, 09:48

Search for AHK Tail() function

User avatar
L40P
Posts: 14
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: 4865
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?
Remaining with AHK 1.1.25.02 until v2 will become beta.
User avatar
L40P
Posts: 14
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”

Who is online

Users browsing this forum: No registered users and 36 guests