SetCommand() - extra parameter to allow replacing current command text

Posted by Worstje on Mon 30 Apr 2012 07:51 PM — 3 posts, 18,690 views.

Netherlands #0
The subject says it all. Until a minute ago, I wasn't aware SetCommand() did not let me replace the output in the command window.. which sucks. :-(

I've got a preview window with squiggles and tons of that fancy spelling stuff. Right-clicking a misspelled word pops up a list of suggestions you can replace said word with. Except when I tried that just now, I found out about error 30020: eCommandNotEmpty.

Screenshot for reference purposes: http://qs.merseine.nu/images/previewer7.png

As such, I'd like to request a second boolean parameter ReplaceExisting that does not mind me replacing the contents.

(P.S.: I already save the cursor/selection location and adjust that accordingly, so assuming my math is right, there won't be any usability issues there that would hinder adding this feature.)

((P.S. #2: The Help file does not mention a second Lua-only parameter. I quatriple-checked this time!))
Amended on Mon 30 Apr 2012 08:32 PM by Worstje
Australia Forum Administrator #1
Template:function=PasteCommand
PasteCommand

The documentation for the PasteCommand script function is available online. It is also in the MUSHclient help file.



... in conjunction with:

Template:function=SetCommandSelection
SetCommandSelection

The documentation for the SetCommandSelection script function is available online. It is also in the MUSHclient help file.

Netherlands #2
It is you. It is not me, it is you.