Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
stormydragon
Newbie


Joined: 03 Sep 2006
Posts: 4

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
stormydragon
Newbie


Joined: 03 Sep 2006
Posts: 4

PostPosted: Mon Sep 04, 2006 4:45 am   
 
Is there someway to make it handle multiple word names?
Reply with quote
stormydragon
Newbie


Joined: 03 Sep 2006
Posts: 4

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
stormydragon
Newbie


Joined: 03 Sep 2006
Posts: 4

PostPosted: 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.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net