|
danielsan Newbie
Joined: 11 Nov 2003 Posts: 1 Location: Netherlands
|
Posted: Tue Nov 11, 2003 12:46 am
Zmud Spacing |
I have a little script that needs three consecutive spaces to be send in a row. However zmud reduces this to one space immediately upon execution. Changing the lf to cr didn't help and neither did changing emulation. Anyone has a good idea to go at this?
Regards,
danielsan |
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Tue Nov 11, 2003 1:54 am |
If the command you are trying to send is something of the form:
word1(3 spaces)word2
then you can preserve whitespace by having the command be "word1(3 spaces)word2" (with the quotes).
For example,
#TRIGGER {test} {"word1(3 spaces)word2"} |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Tue Nov 11, 2003 2:06 am |
I would also think you could get three spaces by %concat(' ', ' ', ' ') but you'd have to try it and see.
|
|
|
|
Valdar Novice
Joined: 17 May 2003 Posts: 30 Location: USA
|
Posted: Fri Nov 14, 2003 8:26 pm |
I believe you can also use the ~ thing to force zMUD to take it literally and not parse it down to 1 space ie: word1~ ~ ~ word2
|
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Fri Nov 14, 2003 8:58 pm |
Yeah, I did this in a script I wrote last night and it worked.
But it is UGLY when you have a lot. Maybe there's a better way to do it, but I set up an alias to #ECHO some lines from the documentation onto my screen. I had to replace all the spaces with " " (since is my escape char). Made for a pretty unreadable script. If there's another option, I'd like to hear it. |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Fri Nov 14, 2003 9:01 pm |
Reading back over the thread, I noticed Charbal's reply again. I'm going to try this tonight. I tried:
Code: |
#ECHO " Text text text text text text " |
etc., but it didn't like the syntax. I'm still working to learn all the zMUD syntax, and looking back on your answer I think I should have tried:
Code: |
#ECHO {" Text text text text text text "} |
I'll have to give that a shot. I need to sit down and read the docs so I'll know when using {} is required and when it's not and what it actually makes zMUD do. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Nov 15, 2003 8:09 am |
Your
#ECHO " Text text text text text text "
is fine. Nothing wrong with that syntax. Where did you get an error?
You use "" as normal quotes to preserve spacing. The difference between using "" and {} is that zMUD variables and functions are expanded within {} but not within "".
You should *never* use both. Use one or the other. |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Sat Nov 15, 2003 5:24 pm |
Well shoot Zugg, seems the more I know the less I remember. I did just what you said and, no big surprise, it worked fine.
One of these days I'll get it all down pat, I promise. |
|
|
|
|
|