Grabbing text into a log file

Scripts and support for your favorite MUD client.
Vipplin
Sojourner
Posts: 434
Joined: Thu Jun 14, 2001 5:01 am
Location: Hawaii

Grabbing text into a log file

Postby Vipplin » Wed Apr 19, 2006 10:44 pm

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!
Disoputlip
Sojourner
Posts: 956
Joined: Thu Feb 21, 2002 6:01 am
Location: Copenhagen

Postby Disoputlip » Sun Apr 23, 2006 12:07 am

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
Drev
Sojourner
Posts: 1
Joined: Mon Apr 24, 2006 3:08 am

Postby Drev » Mon Apr 24, 2006 3:37 am

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

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)} ""
Vipplin
Sojourner
Posts: 434
Joined: Thu Jun 14, 2001 5:01 am
Location: Hawaii

Postby Vipplin » Mon Apr 24, 2006 8:13 pm

Thanks, I'll probably do the menu select thing - yeah I'd found the stuff for the last 3 lines - funny it isn't avail for further back. Cheers!

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 5 guests