Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ scroll back while displaying recent text

scroll back while displaying recent text

Posting of new messages is disabled at present.

Refresh page


Pages: 1 2  3  

Posted by LupusFatalis   (154 posts)  Bio
Date Thu 16 Apr 2009 11:16 PM (UTC)
Message
Alright. Now, I'm not sure if there is a setting for this or whether it is something I will need to program.

Basically, what I want to happen is have the most recent lines (perhaps 10) still displayed at the bottom whenever I scroll back. This way I'm able to react to current events while looking back in time.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 17 Apr 2009 11:03 AM (UTC)
Message
A quick way is to go to the Window menu -> New Window.

This opens a new output window (and a new command window) for the same world, which displays the same stuff as the main one. However one window can be paused while you scrollback, and the other one can scroll. So with a bit of resizing and moving you can achieve what you want.

A more sophisticated approach might be to write a plugin that opens a small miniwindow at the bottom of the main window (resizing it to make room). This small window could then show the scrolling text. This is a bit more work, I don't think anyone has done that yet.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #2 on Fri 17 Apr 2009 02:26 PM (UTC)
Message
Thanks Nick, I'm going to give that a try. I'll post my results when I get around to working on it.

I got a quick question on something else that I'm sure is just me being dumb... You see the mud has a prompt *sometimes* ... that is just "> "

So whenever it comes into play it makes all my triggers mess up. I was trying to figure out how to make a primary trigger to simply remove that text from the start of any line before the line is evaluated by any other triggers, but I can't.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #3 on Fri 17 Apr 2009 06:40 PM (UTC)
Message
You most likely want to select the 'Convert IAC EOR/GA to newline' option in the Output screen of your configuration. A good bet is that your prompts aren't terminated with a newline, which causes this issue of yours.
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #4 on Fri 17 Apr 2009 10:04 PM (UTC)
Message
That Convert IAC EOR/GA to newline doesn't seem to do anything. I guess I'll leave it on, not sure if it can hurt.

If it helps... I can solve it by making a second trigger for every trigger I have... that is a duplicate in every way except that the pattern starts with "^\> "

This just seems like a really cumbersome way of dealing with the issue. I'm not sure it will work later when I start doing some of the more complicated triggers.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #5 on Fri 17 Apr 2009 11:27 PM (UTC)
Message
See http://mushclient.com/faq point 11.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #6 on Sat 18 Apr 2009 01:13 AM (UTC)
Message
Nick, I read through that stuff. Eventually I found that LUA plugin you wrote, works beautifully... Haven't a clue about the language so I don't want to touch it. But it works now.

http://mushclient.com/forum/?id=7430

Of course now I have this funky little line with nothing but "> " on it, on occasion. But its a small price to pay for my sanity!

Thanks man!
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #7 on Sun 19 Apr 2009 08:06 AM (UTC)
Message
someone mind letting me know if I changed this properly...


<script>
<![CDATA[
function OnPluginPacketReceived (s)
  return (string.gsub (s, "> ", ""))
end -- function OnPluginPacketReceived
]]>
</script>


I had it working where it would put the newline after the stupid > prompt... but I got bugged by the spam eventually... I think this fixes it, and it seems to work thus far. There aren't many situations in the mud where I can think of removing >'s to be a bad thing... But I just want to make sure that this will only remove "> " if it is the first part of a line? Thanks folks.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 19 Apr 2009 11:19 AM (UTC)
Message
You are probably better off adding a newline, like this:


function OnPluginPacketReceived (s)
  return (string.gsub (s, "\n> ", "%1\n"))
end -- function OnPluginPacketReceived


Then make a trigger to omit that. However I suppose omitting it right now isn't so silly, but I would look for the newline first, otherwise anything that says "> " in the message will have it omitted, eg.



function OnPluginPacketReceived (s)
  return (string.gsub (s, "\n> ", ""))
end -- function OnPluginPacketReceived

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #9 on Sun 19 Apr 2009 03:51 PM (UTC)

Amended on Sun 19 Apr 2009 04:01 PM (UTC) by LupusFatalis

Message
Ok, I tried your second bit alone, but it doesn't display the two lines on different lines. So trying to keep it all in one little script, I think this answers the concern that it might omit stuff.


function OnPluginPacketReceived (s)
  return (string.gsub (s, "\n> ", "\n"))
end -- function OnPluginPacketReceived


just to give an example, here is raw feedback after sending two commands (including the echoed commands)... as an after thought. I just noticed when I selected it, and pasted it there is another trailing > on the same line, that doesn't actually display.

show skills parry
show skills control
parry: Legendary.
> control: A Grand Master.
>

which this plugin by itself replaces as follows...

show skills parry
show skills control
parry: Legendary.
control: A Grand Master.

So it seems to work. Does it address the concern you pointed out? Or did I manage to make it worse somehow, lol...

I found one situation where it doesn't seem to work... that is whenever I send the mud a carriage return it will send me back the following... Don't understand why it doesn't fire here.

"

> "
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #10 on Sun 19 Apr 2009 04:20 PM (UTC)
Message
Actually, I think I'm onto something as to why..

Here, i type in the command who and receive:
Name Idle Time
a damp elf 26s
a furry cushion 8s
a passionate soldier
a worthless fool
Abraxas the rowan
an ardent ranger 32s
Azoron the rowan
Domik the human 32s
Fisher the human
Maerwen the elf 48s
Tikeeke the spyder 6m 15s
[HG] Troylance the rowan 16s
We extrapolate that there are 15 players on. Only 12 returned their census forms.
Estimated active characters: 180 this month, 50 today.
Ferdarchi was last renewed 6 days 41 minutes 16 seconds ago.
>

Later, the mud sends more feedback as something happens internally, etc... This new feedback ends the line.

> Your aura appears to be intense blue.

So this script doesn't seem to fire until it receives an entire line. But by the time it receives the entire line it has been too late and doesn't run in some cases.
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #11 on Sun 19 Apr 2009 04:28 PM (UTC)

Amended on Sun 19 Apr 2009 04:35 PM (UTC) by LupusFatalis

Message
As an aside...

function OnPluginPacketReceived (s)
  return (string.gsub (s, "> ", ""))
end -- function OnPluginPacketReceived

Does catch everything and fix it all... But I do recognize the distinct possibility that something goes haywire when I enter a room that has...

part of a desc > another part of a desc

although... I just ran a test without the plugin
say sfasfd > heya
You say in common, 'Sfasfd > heya'
>

with the plugin
say sfasfd > heya
You say in common, 'Sfasfd heya'

Maybe I'm misinterpreting where you think it will have an error? Like I said, I'm not really positive what this lua code is doing... it seems to be replacing all old text with the new text... having it replace > in the middle of a paragraph with "" is less of a problem for me than having the > at the beginning screw up all my triggers... its not ideal, and I'd like to fix it, but if the solution is too complicated, don't worry about it. Thanks again bud, you've been a great help.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #12 on Sun 19 Apr 2009 09:29 PM (UTC)
Message
Quote:

Maybe I'm misinterpreting where you think it will have an error?


Your second example, with the plugin, does exactly what I thought it would - remove "> " from any text, not just at the beginning of the line.

My idea with the \n> was sound, however I seem to recall someone else who had difficulty with that found there were colour codes as well at the start of the line. A "packet debug" of a prompt would help.

Go to Edit menu -> Debug packets, capture a prompt or two, and turn it off again. Then copy and paste (here) the relevant packet. Probably there is something like:


(newline) (some colour codes) >


Now without the colour codes as part of the string.gsub, it won't match.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #13 on Mon 20 Apr 2009 05:53 AM (UTC)
Message
Incoming packet: 139 (25 bytes) at Monday, April 20, 2009, 1:46:40 AM

urs 17 minutes 2 75 72 73 20 31 37 20 6d 69 6e 75 74 65 73 20 32
3 seconds 33 20 73 65 63 6f 6e 64 73

Incoming packet: 140 (13 bytes) at Monday, April 20, 2009, 1:46:40 AM

ago....[0m> 20 61 67 6f 2e 0d 0a 1b 5b 30 6d 3e 20

Incoming packet: 141 (61 bytes) at Monday, April 20, 2009, 1:46:41 AM

Your aura appear 59 6f 75 72 20 61 75 72 61 20 61 70 70 65 61 72
s to be .[1;37mi 73 20 74 6f 20 62 65 20 1b 5b 31 3b 33 37 6d 69
ntense .[0m.[1;3 6e 74 65 6e 73 65 20 1b 5b 30 6d 1b 5b 31 3b 33
4mblue.[0m... 34 6d 62 6c 75 65 1b 5b 30 6d 2e 0d 0a
Top

Posted by LupusFatalis   (154 posts)  Bio
Date Reply #14 on Mon 20 Apr 2009 05:53 AM (UTC)
Message
Incoming packet: 136 (41 bytes) at Monday, April 20, 2009, 1:46:37 AM

parry: 70 61 72 72 79 3a 20 20 20 20 20 20 20 20 20 20
Legen 20 20 20 20 20 20 20 20 20 20 20 4c 65 67 65 6e
dary...> 64 61 72 79 2e 0d 0a 3e 20

Incoming packet: 137 (46 bytes) at Monday, April 20, 2009, 1:46:37 AM

control: 63 6f 6e 74 72 6f 6c 3a 20 20 20 20 20 20 20 20
A Gra 20 20 20 20 20 20 20 20 20 20 20 41 20 47 72 61
nd Master...> 6e 64 20 4d 61 73 74 65 72 2e 0d 0a 3e 20
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


89,771 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.