Trouble with WindowInfo(win,6)

Posted by Oligo on Sun 31 Mar 2013 07:55 PM — 5 posts, 22,978 views.

#0
WindowInfo(win,6) seems to always return false.

Once I create a window, regardless if the window is visible or hidden, it always seems to return false.

Could be programmer error or misuse, but if I debug and do like

print(tostring(WindowInfo(win,6)))

it always seems to evaluate to false and in logical if/then constructs.

I'm using MUSH 4.84.
USA Global Moderator #1
The "show" flag (info 5, not 6) is whether you want the window shown. Infotype 6 is whether it had to be temporarily hidden. This only applies to position codes 5, 7, 9, 11.

http://www.mushclient.com/scripts/doc.php?function=WindowInfo
Amended on Sun 31 Mar 2013 08:33 PM by Fiendish
#2
Ok thnx. I will play around with this.

I just wanted to programmatically determine of the miniwindow was displayed or not.

So it seems I would do a logical test like the following?

if (WindowInfo(win,5)) then
  print("window is displayed")
else
  print("window is not displayed")
end
Australia Forum Administrator #3
As Fiendish said, WindowInfo(win,5) gives you whether or not you want it shown. Under certain circumstances (especially using automatic positioning) it might not be shown even if you wanted it shown.
#4
Thanks for the help, WindowInfo(win,5) was what I needed.