I use the following code to drawing a window in mushclient,the version 4.43 show the window correct.all the upper version include 4.60 show nothing. I use the Immediate to test this. Is it has any other settings for drawing this? Thanks!
win = GetPluginID () -- get a unique name
WindowCreate (win, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white")) -- create window
WindowShow (win, true) -- show it
See the release notes for version 4.46. In that there was a change to miniwindow creation:
http://www.gammon.com.au/scripts/showrelnote.php?version=4.46&productid=0
2. WindowCreate now returns two error messages:
eNoNameSpecified - a zero-length string was supplied as the window name
eBadParameter - the width or height of the window may not be negative
In your case you could check with the "check" function like this:
win = GetPluginID () -- get a unique name
check (WindowCreate (win, 0, 0, 200, 200, 12, 0, ColourNameToRGB("white"))) -- create window
WindowShow (win, true) -- show it
When I do that I get the message:
Run-time error
World: SmaugFUSS
Immediate execution
[string "Immediate"]:2: No name has been specified where one is required
stack traceback:
[C]: in function 'error'
[string "Check function"]:1: in function 'check'
[string "Immediate"]:2: in main chunk
Your code would have worked in a plugin but in the immediate window GetPluginID () returns an empty string.
You can add something, eg.
win = GetPluginID () .. "main_window"
That works in a plugin and also in the Immediate window.
Thanks, Now I can use the new version!
thanks