Enter Text Into Miniwindow

Posted by Sediket on Tue 25 Sep 2018 04:51 PM — 6 posts, 25,744 views.

#0
This is a cosmetic question. I use multiple chat miniwindows which requires Mushclient to be maximized or expanded to a big portion of the screen. This seems to be the best way to utilize the miniwindows.

So I have lots and lots of text maps and notes saved in txt files so I made some aliases to list all the files in a directory/search and open with notepad from within Mushclient.

But, given the size of the Mushclient on my laptop, notepad or Mushclient will take the foreground. So, what I would love to do is have the txt file open up in a miniwindow and be able to make changes to it there. Looking at the miniwindow code it looks super challenging so I'm wondering if this has been done by someone else or if it's even possible without being super and ultra complicated?

BTW I don't post too much on here and I've been using Mushclient for many years, it's very awesome!
Australia Forum Administrator #1
There is no support for that. One thing you would have to introduce is the concept of focus to the miniwindows because normally what you type goes to command window at the bottom of the world window.
#2
Thanks for the response. Do you have pointers into just reading a text file into a mini window?
Australia Forum Administrator #3
I’m on holidays just now, so I’m unable to give a detailed answer to that question, sorry.
#4
Oh, no problem, enjoy :D
USA Global Moderator #5
Quote:
Do you have pointers into just reading a text file into a mini window?


Well, to put it into terms you're already familiar with...

You're already using chat miniwindows to display lines of text from the game, right?

You could do exactly the same thing except instead of displaying lines from the game you could open the file and display lines from that.

Per https://www.gammon.com.au/scripts/doc.php?lua=f:lines you would do something like


f = io.input("your_text_file.txt")
for line in f:lines() do
      -- SEND THE line TO YOUR CHAT MINIWINDOW HERE
end 
f:close()