house member miniconsole
house member miniconsole
I have been trying to have mudlet keep a list of who is currently online for my house refreshed in a miniconsole. I have the miniconsole working but I can't figure out how to capture the list. Would it involve using a timer to send the hwho command and a regex pattern to send the output to the miniconsole? I am using achaea. Thanks.
Re: house member miniconsole
Basically, yes. You'd have to constantly refresh the list by sending HWHO, gagging and parsing the output and then displaying it on whatever console you wanted. You could also do things like a trigger for your house chat that automatically adds anyone who says anything, because they're obviously online.nexa33 wrote:I have been trying to have mudlet keep a list of who is currently online for my house refreshed in a miniconsole. I have the miniconsole working but I can't figure out how to capture the list. Would it involve using a timer to send the hwho command and a regex pattern to send the output to the miniconsole? I am using achaea. Thanks.
I'd keep the members list as a table like:
then when someone is registered
which means that whenever you resend the HWHO you can reset the table with a simple call to
then just parse the list for your miniconsole with a for loop
Re: house member miniconsole
Ok thanks, I will give that a try and see if that works. I was wondering if it would be easier to have it just parse the output from the "hwho" command since not all housemates will always say something. Would I just use a timer for that to have it issue the hwho command at a set interval?
Re: house member miniconsole
Ok so I've got something similar to Vadi's Data Capture triggers. It captures the list and I figured out how to send it to the miniconsole.
Is there any way to delete the buffer once you run appendBuffer()?
Right now I have this:
EDIT: Kind of fixed it. I changed the size of the miniconsole so it looks better now. My only worry is that if more members are online, it will get cutoff because the console isn't big enough. Any way to solve this?
Is there any way to delete the buffer once you run appendBuffer()?
Right now I have this:
When there aren't a lot of lines for the list it just repeats itself again at the bottom so I get something like this:
EDIT: Kind of fixed it. I changed the size of the miniconsole so it looks better now. My only worry is that if more members are online, it will get cutoff because the console isn't big enough. Any way to solve this?
Re: house member miniconsole
Count the number of lines you want to display and resize the height of the miniconsole? If they ever gets too large you can limit it by doing something likeit will get cutoff because the console isn't big enough. Any way to solve this?
if lines >= maxlines then echo "and others..."
Or maybe you could implement a second page like the tabbed chat example in the forums?
Re: house member miniconsole
You can also always just scroll a miniconsole by hovering over it and using the mouse scroll wheel to scroll up and down if there's too many lines to display (works just like the main window)