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
patryn
Apprentice


Joined: 26 Sep 2001
Posts: 124

PostPosted: Thu Jan 13, 2005 8:58 am   

How to disable command line scripting?
 
There are times when i have to use the special character ";" in the command line to send to the mud.

At such times i wish to quote the ; character.
I have tryed using ~ before the ; character, as well as quoting everything inside "" marks. The results are below.

Input: blah~;blah
Output: blah

Input: "blah;blah"
Output: blah

If i try more then one ; no matter how many quotes are used it always separates it into separate commands.

So... short of changing the ; special character, is there anything else i can do? Like perhaps disable the scripting from the command line?

Im sure this used to be possible, but i cant find the option in 7.05a

Thanks.

(Alternatively, switching off the ; char from the command line, then back on again would also be a suitable solution, but i doubt this is possible.)
_________________
That which does not kill us, makes us stronger.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Jan 13, 2005 9:59 am   
 
I have no problem using either of the 2 formats with the default Preferences, both formats work perfectly.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 13, 2005 10:14 am   
 
With default preferences:
1. blah~;blah
2. "blah;blah"
3. Settings Menu, Parse (toggle)
4. CTRL-R (toggle)
5. Computer icon next to command line (toggle)
6. #VERBATIM (command-line use is limited to disabling parsing)

There may be other methods but these are all I could think of quickly.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 13, 2005 11:45 pm   
 
I've found it useful to just change the special character from ; to ` (the backtick under the tilde, on the button just above the TAB key). Except for player habits, nothing I've encountered in Dragonrealms ever uses the `.
_________________
EDIT: I didn't like my old signature
Reply with quote
patryn
Apprentice


Joined: 26 Sep 2001
Posts: 124

PostPosted: Fri Jan 14, 2005 2:00 am   
 
Thanks for the feedback guys, you've made me realise that the problem could be with some of my command line triggers, and it was. :)

I'll just describe it here, just incase anyone else ever has a similar problem.

I have a trigger that captures everything from the command line, then modifies the output to the mud, depending on the roomtype that the current position on the mapper is in.

#ONINPUT {^(*)$} {;script...}

Input like "blah;blah" is captured into completely into %1. This is great. Unfortunately, this is then parsed through to an alias (adjust_input) as a parameter.

The alias picks up the first blah and treats the ; as end of line. So the second part just gets sent to the screen.

My parsing of the information was this:
temp=%1
adjust_input @temp

The way I've gotten around the problem is by aborting the processing early on in the trigger, if a ; is detected within the input.

#if %pos(";",@temp) {#abort 1}

This currently works for my purposes.. simply because i currently have no reason to have any of the aliases process ; characters...

However... i _would_ like to know if there some way i can change the way that the @temp var is parsed to the alias so that the input is NOT expanded into multiple lines?

Thanks.
_________________
That which does not kill us, makes us stronger.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jan 14, 2005 6:59 pm   
 
Possibility 1. Eliminate the alias by including its script in the trigger
Possibility 2. Eliminate the parameter to the alias by replacing all its references to %1 with @temp.
Possibility 3. Eliminate the trigger, and use the alias directly when you want to "speak with an accent". Renaming the alias to something shorter would probably be helpful with this option.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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