open log file at end
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
hphillips
open log file at end
Is there a way to configure textpad to open a file and position the cursor at its end rather than at the beginning of the file. I have a long log file and I always have to scroll to the end to update it which is frequently. Thanks
if the file name to be opened is followed by (123), cursor will be positioned on line 123.
You could try to open your file at a very large line number (a number larger than the actual line count) and see what happens.
Btw, if file name is followed by (123,456) cursor will be positioned on line 123 at column 456.
You could try to open your file at a very large line number (a number larger than the actual line count) and see what happens.
Btw, if file name is followed by (123,456) cursor will be positioned on line 123 at column 456.
-
hphillips
Hi Mudguard -
your sounds like a good idea, but I am not sure how to implement it. Right now I open the log file with textpad via a desktop and the filename and path are specified via the Target: element however when I follow that by number or a number in parentheses as you suggest it still opens with cursor positioned at the beginning. ie I get the same effect with:
Target: d:\hp_data\log.txt
Target: d:\hp_data\log.txt 500
Target: d:\hp_data\log.txt (500)
or did you mean that the method you suggested would work on a command line?
Thanks
your sounds like a good idea, but I am not sure how to implement it. Right now I open the log file with textpad via a desktop and the filename and path are specified via the Target: element however when I follow that by number or a number in parentheses as you suggest it still opens with cursor positioned at the beginning. ie I get the same effect with:
Target: d:\hp_data\log.txt
Target: d:\hp_data\log.txt 500
Target: d:\hp_data\log.txt (500)
or did you mean that the method you suggested would work on a command line?
Thanks
-
hphillips
This is venturing beyond the halls of TP, but it would work.
Write an AutoIt script using _FileCountLines to return the number of lines in the log file, then open the log file at that line number from a dynamically built command line.
You could even make it dynamic for any file using $CmdLine--a built in array that reads command line parameters.
AutoIt is free.
www.autoit.com
Write an AutoIt script using _FileCountLines to return the number of lines in the log file, then open the log file at that line number from a dynamically built command line.
You could even make it dynamic for any file using $CmdLine--a built in array that reads command line parameters.
AutoIt is free.
www.autoit.com
(2[Bb]|[^2].|.[^Bb])
That is the question.
That is the question.
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm