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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Nov 13, 2008 6:10 pm   

Aliases and parsing
 
I cannot seem to remember what the solution was in order to fix the fact that if I make an alias for something, anything in %params that has certain characters like " has them stripped. So if I wanted to do an emote with speech in it, but wanted to alias that emote, I can't. How can I fix that?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Nov 13, 2008 11:21 pm   
 
There's an option for whether aliases parse their arguments or not. Turn it off.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Fri Nov 14, 2008 8:08 am   
 
Ah, that's what it was. Thank you.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Sun Nov 16, 2008 9:56 am   
 
There should be a half-butt remove parsing option which only removes the parsing on basic characters, but still parses aliases within aliases and such. Razz
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Nov 16, 2008 9:01 pm   
 
What? There's no parsing on the command line that would result in something that I'd call "aliases-within-aliases". Arguments to an alias are always strings, regardless of whether or not they're parse on or parse off. To get the arguments out as commands you'd need to use #exec or perhaps #send in both cases.

Describe exactly what it is you're doing; I'm sure there's a way to do it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon Nov 17, 2008 12:45 pm   
 
I thought it was pretty obvious? Any alias or oninput trigger can fire off of a line sent by another alias or oninput trigger, so far as I know, these are disabled when parsing is turned off?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Nov 17, 2008 1:59 pm   
 
Ah, I understand a little better now. I'm not sure what'd happen in that case, but if it's a problem you could just create two aliases, one for calling from within scripts with Parse Arguments on, and one for the command line where it's off.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon Nov 17, 2008 4:01 pm   
 
I suppose, I just think a half parse feature would be neat if it were doable, shutting of parsing only for special characters. But I suppose it will merely be a dream of convenience.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Nov 17, 2008 11:21 pm   
 
Well yes, but adding more options to the UI makes things more confusing for new users (and old users, tbh) and since you can do it with what you have already, there's no need.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Tue Nov 18, 2008 12:23 am   
 
And how can I do it?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Nov 18, 2008 1:31 am   
 
I already explained that, using two separate aliases, one for the two different options.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Tue Nov 18, 2008 1:58 pm   
 
... but what if you want to use an alias in the version of the alias that doesn't parse special characters?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Nov 18, 2008 2:18 pm   
 
Then you can do that all you like. The parse arguments option only affects the values of that alias' parameters when it's called, it doesn't change anything involving aliases called within that alias (unless that alias is doing something with the %nn variables, anyway, but if an alias cared about that you wouldn't want to disable Parse Arguments in the first place).

Basically, one of two things is happening here. Either you're making a mistake in your understanding of how Parse Arguments works and you should make some test cases to see what it affects and how, or I'm not understanding what your problem here is and you should explain it in more detail. XML and actual code about the actual problem you're solving will help.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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