How to work an "enter/return" key press into my alias?

Posted by Princess on Sun 23 Aug 2015 08:55 PM — 2 posts, 12,141 views.

Canada #0
Hi, I am staff on a modified DIKU MUD and am trying to formulate an alias that will allow me to get a bunch of information from my item database very quickly.

I want to obtain a list of all items of a certain type, across all zones. I don't want to have to bother typing out the command to show each item type for each zone, though, so I just wrote an alias to string together the commands for every single zone.

However, sometimes the list a zone returns is so long, the "enter" key needs to be pressed to continue to generate the full list.

So for instance, after typing the command, I could get a list of 150 items from zone 5, but because of the pagelength limitations of the MUD, only 100 of them are displayed. To display the other 50, I would need to hit the ENTER key. But my alias does not know how to do this, so it skips that part and keeps grabbing information from zone 6, zone 7, and so on.

How could I work a simple "enter" key press into my alias?

Thanks for any help!
Australia Forum Administrator #1
I don't suppose you can change that limit? I always find "paging" annoying when using a modern client.

The tricky bit is, sometimes you need it and sometimes you don't.

So you might need:


foo
bar


And sometimes:


foo
<enter>
<enter>
bar


Right?

So we can't just send down "foo" then "bar".

I think you need to see this: http://www.gammon.com.au/forum/?id=4957




I can help you with doing this, but I need to see two things:

  • What you see, exactly, when you need to press <enter> (copy and paste)
  • What your "prompt" looks like. That is, what would you expect to see at the end of this list you are looking at?


Also, does one or both of the above end in a new line? Or is the "cursor" (if there was one) at the end of the line? If so, we also need to fix that up so that triggers will work.




By far the simplest thing would be to get the MUD configured to not have the breaks. On my SMAUG MUD for example I can type:


config -pager