Error when trying to create miniwindows

Posted by Grek on Wed 06 Aug 2008 02:53 PM — 8 posts, 31,334 views.

Sweden #0
MUSHClient v4.27

Line in error:
world.WindowCreate("test", 100, 100, 300, 300, 12, 0, 16777215)
Script error
World: IoM
Execution of line 1 column 0
Immediate execution
Traceback (most recent call last):
File "<Script Block 50>", line 1, in <module>
world.WindowCreate("test", 100, 100, 300, 300, 12, 0, world.ColourNameToRGB("white"))
File "L:\Programmering\Python25\Lib\site-packages\win32comext\axscript\client\pyscript.py", line 142, in __getattr__
return getattr(self._scriptItem_.dispatchContainer,attr)
File "L:\Programmering\Python25\Lib\site-packages\win32com\client\dynamic.py", line 500, in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: world.WindowCreate

Line in error:
world.WindowCreate("test", 100, 100, 300, 300, 12, 0, world.ColourNameToRGB("white"))
Amended on Wed 06 Aug 2008 03:03 PM by Grek
USA #1
You're using a version before miniwindows were introduced... maybe you should try upgrading?
Sweden #2
Thanks David, I was just about to start converting 300 lines of python to lua.

I did update to the latest version available on the Downloads page before posting - would be good if the link somehow always pointed to the latest version available. :)

Edit:

Another question, does lua have the same issues with threading as python?
Amended on Wed 06 Aug 2008 03:26 PM by Grek
USA #3
Quote:
I did update to the latest version available on the Downloads page before posting - would be good if the link somehow always pointed to the latest version available. :)


See the MUSHclient FAQ, item 4 :-)
http://www.gammon.com.au/forum/?id=7794

Part of the reasoning is that people who see forum announcements will see the "test" versions, whereas people who aren't interested in following the latest-and-greatest will just go to the download page.

Quote:
Another question, does lua have the same issues with threading as python?

Well, I'm not sure which issues Python has with threading. :) Lua does not natively support concurrent multi-threading, although it does have something called cooperative multi-threading ("coroutines" in its vocabulary). What kind of issues are you running into?
Sweden #4
I can't say for sure anymore, been a while, but I recall having problems using time.sleep().

Maybe I forgot to thread it though. :)
USA #5
Oh... if you're just sleeping the script, then yes, I think that that will cause the whole client to block until the call to sleep ends. I think that normally what you do is to create a timer that, after the desired time, calls the script again. Nick has several examples of how to do this with coroutines on the forums; I don't remember the links or post titles off-hand, but I think one of the keywords is "pausing".
#6
I can't get mini windows to work? is there a tab or something I need to click or should I just delete my mushclient and reload it from scratch?
Australia Forum Administrator #7
In what way is it not working? If this is related to your other post about the experience bar, try what I suggested there.