Processing constent stream of information from txt file

Get help with using AutoHotkey and its commands and hotkeys
L40P
Posts: 5
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: 623
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: 1928
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

L40P
Posts: 5
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: 4166
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?
Except as noted otherwise all of my code is tested on Win 10 Pro (x64) using the current AHK version.

Return to “Ask For Help”

Who is online

Users browsing this forum: Absolutewind and 20 guests