|
stormydragon Newbie
Joined: 03 Sep 2006 Posts: 4
|
Posted: Sun Sep 03, 2006 3:41 am
Sending commands to another window |
Suppose you have the main output window A and a child window B. Is there anyway for a trigger running in window A to create a trigger in window B?
I tried the obvious method of :B:#TRIGGER .... but this creates a syntax error in the script editor. Apparently the :B: thing only works on the commandline, not inside scripts. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Sep 04, 2006 3:10 am |
Nope, it works inside scripts as well. More than likely you have an issue with whatever B is, such as multiple words or something.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
stormydragon Newbie
Joined: 03 Sep 2006 Posts: 4
|
Posted: Mon Sep 04, 2006 4:45 am |
Is there someway to make it handle multiple word names?
|
|
|
|
stormydragon Newbie
Joined: 03 Sep 2006 Posts: 4
|
Posted: Mon Sep 04, 2006 5:04 am |
Just as an example, this script:
#IF (!%window( "Shouts - %2")) {
#MAKEWINDOW "Shouts - %2" OPEN
:public:#ONINPUT {^Test$} {Test...}
}
#CAPTURE "Shouts - %2"
#GAG
Will get a syntax error at the # in #ONINPUT. If I remove the :public:, though, it doesn't. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Sep 04, 2006 5:12 am |
That script doesn't cause any syntax problems for me. Either you've got something really funky happening in your copy of ZMud, or there's something in Test... that is causing the syntax problem. Unless, of course, you have a typo at :public:. :public:: will definitely cause a syntax error.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
stormydragon Newbie
Joined: 03 Sep 2006 Posts: 4
|
Posted: Tue Sep 05, 2006 5:21 am |
Oh, I figured out the problem. I forgot that I'd remapped the redirect character from : to ^ because : is a command on the MU* I'm using. So I need to replace :public: with ^public^
Still curious how to redirect to a window with a multiple word name. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Sep 05, 2006 10:43 am |
You can use a number for pointing to windows with multi-word names, but the syntax will likely require the use of an #EXEC expansion trick in order to always get the correct window and not trip the syntax checker. If you only have one child window though then 2 will always be its number and you can script it that way.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|