Grabbing text into a log file
Grabbing text into a log file
Question - I want an alias that can snag a certain number of lines (say the last 10 lines) and append them onto a log file. I'm not getting anywhere with the help, though I'm sure it can't be too complex and should be doable. Thanks for any assistance!
-
- Sojourner
- Posts: 956
- Joined: Thu Feb 21, 2002 6:01 am
- Location: Copenhagen
I don't think it is doable.
I have never seen any zmud commands to get things like that from the buffer.
If you are already logging everyting into a file then you can use the %grep command etc.
else there is the #scroll command, but it doesn't really work with number of lines
I'm not totally sure, and I hate to say you can't if I'm not 100% sure, so mabye you should try the zMud forum.
http://forums.zuggsoft.com/index.php?page=2
Just to check the geek fact0r there check the text to morse code converter:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=22982
I have never seen any zmud commands to get things like that from the buffer.
If you are already logging everyting into a file then you can use the %grep command etc.
else there is the #scroll command, but it doesn't really work with number of lines
I'm not totally sure, and I hate to say you can't if I'm not 100% sure, so mabye you should try the zMud forum.
http://forums.zuggsoft.com/index.php?page=2
Just to check the geek fact0r there check the text to morse code converter:
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=22982
I believe only the predfined variables %line, %line1, and %line3 pull from the buffer which is fairly limited. Here is a work around utilizing a child window for the logging.
Usage: Cap xx
Where xx = number of lines to log
The command #window {1} assumes your main window is in fact window #1, replace it with correct window # or window name.
Alternative. Select the desired text and use a speed menu to log it on right click.
Usage: Cap xx
Where xx = number of lines to log
Code: Select all
#ALIAS cap {#window {mylog};:mylog:#log myfile.txt;#capture ({%1}) mylog;:mylog:#log;#window {1}}
The command #window {1} assumes your main window is in fact window #1, replace it with correct window # or window name.
Alternative. Select the desired text and use a speed menu to log it on right click.
Code: Select all
#MENU {record} {#file (1) {myfile.txt};#write (1) {%selected} ("===== End of Capture =====");#close (1)} ""
Who is online
Users browsing this forum: No registered users and 5 guests