|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Aug 25, 2007 5:16 pm
Working with Windows in CMUD |
Can anyone possibly really delve into this matter? I've tried multiple ways of going about things with the new system, but can't even get a simple button placed in a separate window to work right.
Basically, I created a new window. I set it to use the main network connection and to be floating. The window creates itself fine. I then changed the settings to not show an output window (I just want this window to hold buttons and to send all commands to the main window) and added the button. Just for testing purposes, I just have LOOK in the script for the button. Whenever I press on it, it doesn't send the command to the main window.
So, I don't know if it is a matter of where that button is sending the command (to the window itself or to the main one), or if the button isn't working right for some reason. I've looked a bit (but not exhaustively) to see if there is a better tutorial on using windows but haven't found one that really puts it all in perspective. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Aug 25, 2007 5:24 pm |
How are you trying to send the LOOK command to the main window (as opposed to this sub-window)? That's probably the root of your problem.
Also, what do you mean by "not show an output window"?
The easiest way to explain your problem is to describe how to create this problem afresh, from scratch, in the untitled session. That way we can try to reproduce your problem and suggest possible alternatives. As it stands, I can't get this to fail. |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Aug 25, 2007 7:36 pm |
Bah, never mind. I forgot to use the WindowName:command redirection.
|
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Aug 25, 2007 8:19 pm |
ACtually, now I have another question. Instead of just sending a command I want a button in a separate window to run aliases from an #IF statement.
For example:
#IF {a<b} {dothis} {dothat}
Do I still need to redirect this with the above redirection?
Heh, yeah, window use in CMUD has always been my biggest problem. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Aug 25, 2007 9:11 pm |
Make an alias in the main window.
Then redirect to that alias in the button in the other window. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Aug 25, 2007 9:19 pm |
It depends on where the variable(s) are. If they're in the window with the buttons, put the #if in the button and use the redirect for the two commands. If not, use an alias like Arminas suggests. Either way, yes, you'll need to redirect.
|
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sat Aug 25, 2007 11:10 pm |
Ahh, seems like it is easier to redirect the entire IF statement, then do any manipulations of the buttons through redirection in the main window.
Main:#IF {a<b} {dothis} {dothat}
Worked like a charm. Thanks all. |
|
|
|
|
|