How do you dock the infobar above the command line?

Posted by Boxknife on Thu 04 Dec 2008 02:13 PM — 9 posts, 37,556 views.

#0
How do you dock the infobar above the command line?
I can get it to float there, but it covers the text from the MUD.
Netherlands #1
You cannot place it there to my knowledge.

If you know how to script a little, you can use TextRectangle() to bump the mud-output up a number of pixels so you can hover the Infobar where you want it. Or you can skip the infobar alltogether and just move straight to a miniwindow to draw at the position in question.
USA #2
Seconding what Worstje said about miniwindows.

btw: http://www.gammon.com.au/forum/?id=9097&page=999

Was written for doing that exact thing.

</shamelessplug>
#3
I'm looking at the miniwindow tutorials, but I can't figure out where to start. Is that code invoking the miniwindow just a normal Lua script?

I tried running
"win = GetPluginID () -- get a unique name
WindowCreate (win, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
WindowShow (win, true) -- show it "

In the immediate window, but it says it can't find "WindowCreate" or something.
Amended on Thu 04 Dec 2008 08:02 PM by Boxknife
Netherlands #4
What version do you have? Miniwindows are a rather recent addition - I'd update to version 4.37 if you haven't. A lot of bugs with them have been fixed in that version.

It may not show on the main download page since Nick is kind of conservative with introducing new features to all users of MUSHclient while there may be bugs remaining. But I have used miniwindows for over 3-4 months now and can pretty much garantuee there is nothing that will make it crash or really bugs it out. There's some minor problems, but they'll get fixed in due time. Look in the Announcements forum for the link.
USA #5
Make sure you have Mushclient version 4.37. There's a link to download it in the announcements forum.

You can download a module that will help you do a lot of infobar type stuff from http://www.gammon.com.au/mushclient/plugins/InfoBox.zip

Copy the .lua file into you C:\Program Files\MushClient\Lua directory.

In your script file, put:


require "InfoBox"
myIB = InfoBox:New("info")
myIB:WindowPosition(myIB.windowPositions.S)
Stat = myIB:AddBar()
Stat.barStyle = 0


Stat.caption = "what ever you want goes here."
myIB:Update()



Those last 2 lines can be repeated in your prompt/hpbar trigger to keep it updated.

The InfoBox.lua module takes all the not knowing where to start out of the equation. :)
Amended on Thu 04 Dec 2008 11:19 PM by WillFa
#6
Thanks.

Dang, I thought Mr. Gammon stopped making new versions as soon as he made it freeware.
Australia Forum Administrator #7
Why would he do that?

In fact the miniwindow stuff is a pretty major enhancement - it makes all sorts of exciting things possible.

For example, see this:

http://www.gammon.com.au/forum/?id=8936
#8
:>

Coooool.