Hi,
I just wanted to make a little alias that would replace "get item" with "palm item". So I made this
Pattern: ^(g|get)(\s([\w]+))
Script: send("palm " .. matches[4])
As far as I can tell it works, BUT it looks like this:
475h, 464e, 5f, 130m, 49g xb-
g item
palm item
I see no "item" to take.
475h, 464e, 4f, 130m, 49g xb-
So the "get" is substituted, but still echoed to my screen. Is there any way to just remove the "g item" echo from my screen? To make it look like this:
475h, 464e, 5f, 130m, 49g xb-
palm item
I see no "item" to take.
475h, 464e, 4f, 130m, 49g xb-
I tried with selectString and deleteLine but that always deleted from the Mud output, not from my input.
Alias echo gagging?
Re: Alias echo gagging?
Turn off command echos in preferences and print your own.
You could use moveCursor() and replace the command print, but the result would not be rendered on the screen in alias scripts. The new 1.1.0 development branch has a new robust display that renders all changes to the buffer, but for the time being you'll have to turn off command echos and echo those that you want to echo explicitely.
You could use moveCursor() and replace the command print, but the result would not be rendered on the screen in alias scripts. The new 1.1.0 development branch has a new robust display that renders all changes to the buffer, but for the time being you'll have to turn off command echos and echo those that you want to echo explicitely.
Re: Alias echo gagging?
Try send("palm " .. matches[4], false)
Re: Alias echo gagging?
Well I like command echos generally. Tells me what's going on if I ever read my logs. I went with Vadi's suggestion, simple and easy. Thanks loads! I definitely need to look into the moveCursor thing too..
And since I don't want to start yet another thread.. I have two more questions:
a) Is it possible to start logging automatically on logon? So I don't have to hit that button all the time, I keep forgetting.
b) Is it possible to change the location where logs are being saved? I'd like them somewhere else than in my ~/.config/mudlet .. etc. It's not really that easily accessible if I need to look at something quickly.
And since I don't want to start yet another thread.. I have two more questions:
a) Is it possible to start logging automatically on logon? So I don't have to hit that button all the time, I keep forgetting.
b) Is it possible to change the location where logs are being saved? I'd like them somewhere else than in my ~/.config/mudlet .. etc. It's not really that easily accessible if I need to look at something quickly.
Re: Alias echo gagging?
I think there is startLogging... but I don't remember how to stop it. I don't think that it yet takes arguments as path, unfortunately.
Re: Alias echo gagging?
If I remember correctly, it's startLogging(true) to start it, and startLogging(false) to stop the logging.
Re: Alias echo gagging?
That worked. Thanks a lot!