Number of characters typed

Posted by Razoric480 on Mon 01 Jun 2009 02:32 PM — 3 posts, 16,512 views.

Canada #0
I've had a peek around and didn't quite see anything that related to this. Essentially, I notice that the status bar shows how many lines is in the output currently, how long you've been logged in, and what world you're in right now. However, I haven't found any options to modify this and add something I'd find to be useful.

I use MUSHClient for a social roleplay MUCK, and in some cases, I type fairly large paragraphs. The MUCK, however, has a cut-off line of approximately 1024 characters (before you'd need to add the rest on its own line).

Right now, I have my input box arranged in such a way that, when I'm on the line where I ought to cut off, I can look at the scroll bar and make a rough guess, but it's not very handy. Is there a way, through scripting or otherwise, to display how many characters you've typed so far in the input box?

Thanks
Netherlands #1
That is quite simple. I'll walk you through the process to make a plugin that does this so you can learn from it. :)

1) Go to File->Plugin Wizard... Fill out all the different tabs - use values that seem appropriate. Do NOT select any triggers, variables, aliases or timers, and just to be safe, make sure the checkbox for their removal is turned off.

2) In the script section, select the Lua language and place the following code:

function OnPluginCommandChanged()
  -- OnPluginCommandChanged() gets called each time
  -- the command window changes. It is a rather new
  -- addition, so make sure you have a recent version
  -- of MUSHclient.
  
  SetStatus("Character count: " .. GetCommand():len())
end


3) Click Create and save the XML file somewhere you can remember. It should have been autoloaded now. DONE! :)


This was typed from memory, so if any errors happen, let me know - it's untested :)
Amended on Mon 01 Jun 2009 03:00 PM by Worstje
Canada #2
At first, when I installed it, nothing had happened and was about to report so, but then I updated to the latest MUSHClient (4.40) and now it works like a charm.

Thanks a bundle :) It works great!

Maybe I ought to learn LUA, would probably be handy.