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
Thandril
Adept


Joined: 03 Dec 2000
Posts: 260

PostPosted: Tue Feb 19, 2002 7:16 am   

Setting the command line from a macro
 
A question came up regarding clearing the attached command line before adding text from a macro to the command line. Consulting the handy help file I came across the #INPUT function that seemed to be just the sort of way one might be able to force the command to contain something you wanted. The problem is that macro scripts (they do have the script|text toggle) don't execute commands you place in them, they only place the commands into the command line.

My questions are:

o Is there a way to execute commands from within a macro?
o Is there a way to -always- force the command blank from within a macro?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Feb 19, 2002 12:56 pm   
 
If you select the Send to MUD option of a macro, the command in not put in the command line, it is automatically sent to the MUD.

If you deselect this option and select the Append to Commands option, the commands are put in the command line without being sent to the MUD. If there is some text in the command line already, but it is not selected, the commands of the macro are appended to the end. If the text is selected, the commands of the macro replace the selected text.

When you type something in the command line and hit enter, it is automatically selected. So, if you use a macro with the Append to Command option enabled, it will clear the command line and put the commands of the macro in it. However, if you type some text before hitting the macro key, it will just append the commands of the macro, but this doesn't matter because if you want the command line to be cleared, you won't type anything before you press the macro key.

Kjata
Reply with quote
Thandril
Adept


Joined: 03 Dec 2000
Posts: 260

PostPosted: Thu Feb 21, 2002 1:50 am   
 
Kjata, you very clearly explained everything I already knew and didn't answer my questions at all. Please re-read my questions a bit more carefully. It may not be possible to do what I want and that is an acceptable answer. Clearly the case I am referring to is where you have typed something on the command line and then decided to press a macro key, perhaps in response to some nasty critter walking in that makes your partially typed command unwanted.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Feb 21, 2002 5:15 am   
 
You can also select the Daisy Chain option only. The problem is that if what you were typing has a space at the end, then Daisy Chain will just append, but if it does not have a space, it replaces whatever you have written.

If you already knew about this, and don't like this solution, then kindly forget about it while you notice that giving an example of what you are trying to do and why, is usually best because we don't have to try and guess what you were doing and if it is necessary or not.

Kjata
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Thu Feb 21, 2002 7:19 am   
 
If you had the send to mud option checked, and the first command in the macro script was to #INPUT nothing, surely that would clear the command line?

Cant check it for you cos I dont have zmud in front of me, but this quote:
quote:
The problem is that macro scripts (they do have the script|text toggle) don't execute commands you place in them, they only place the commands into the command line.
Seemed odd to me, because I use commands in macro's all the time...#IFs mostly, but they're definately commands. Course, I always have send to mud checked and I dont bother with daisy chaining or appending to commands.

Caled
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