A clansay alias

Posted by Lyman on Sat 22 Sep 2012 06:26 PM — 10 posts, 35,071 views.

#0
Hi. I'm trying with various regular expressions but I can't figure this out.

I'm trying to make an alias so when I type

cs whatever text here

it sends to the client

clansay whatever text here

I tried using an alias cs * and the command to send clansay %* but its not working.

Any help would be great. Thank you.
USA Global Moderator #1
IMO this isn't the proper forum section for that question. Also, read the Getting Started page on how to make an alias.
http://www.mushclient.com/forum/?id=8084
Amended on Sat 22 Sep 2012 09:53 PM by Fiendish
#2
My apologies. I read what you posted but it doesn't explain what I was specifically looking to do.

Thanks for you info though.
Australia Forum Administrator #3
Lyman said:

I tried using an alias cs * and the command to send clansay %* but its not working.


Can you show what you tried?

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
#4
Hi and thanks!

So, in the mud I play on if I type:

clansay Good morning everyone.

That would say Good morning everyone in the clan channel.

I'd like to only have to type:

cs Good morning everyone.

So, in the Alias: section I used:

cs *

in the Send: section I placed the following:

clansay %*

I also tried %?

I've tried checking and unchecking the regular expression box also.

I can only get the alias to say those characters %? and %* and not the text Good morning everyone. I hope I'm not confusing you. Thanks for your time.
USA Global Moderator #5
Lyman said:
My apologies. I read what you posted but it doesn't explain what I was specifically looking to do.

Yes it does. It talks about _exactly_ what you are trying to do.

From the linked page:
Quote:
Now let's make an alias that takes a variable parameter. For example, say when fighting we often need to kick our opponent. Rather than typing "kick kobold" all the time, it would be quicker to type "k kobold". The word "kobold" will vary, so we want to make that a "wildcard"...


Lyman said:
clansay %*

I also tried %?

The only question I can ask here is why did you try those things?
Amended on Mon 24 Sep 2012 01:47 AM by Fiendish
#6
Thanks again fiendish but that still doesn't answer my question.

I've got more than one word after the aliased word.

I need to send my aliased word plus everything else after it.

In response to your second question...I tried those things because %1 would be used to address the first token after an aliases command, %2 the second and so forth. I thought adding a * wildcard or ? after the % would work but it didn't.

USA Global Moderator #7
Lyman said:

Thanks again fiendish but that still doesn't answer my question.

Yes it does.

Quote:
I've got more than one word after the aliased word.
Glob pattern * picks up everything.
(globbing is what you get when the regular expression box is _not_ checked)

Quote:
In response to your second question...I tried those things because %1 would be used to address the first token after an aliases command

There is only one token in the glob pattern "cs *" (the * is the token). Therefore %1 is everything after the cs.
Amended on Mon 24 Sep 2012 01:27 PM by Fiendish
Australia Forum Administrator #8
Lyman said:

I also tried %?


Yes, but you haven't responded to my request to post your alias.

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Please follow that link and do what it says. Just "describing" what you did is no substitute for actually showing what you did.
#9
Fiendish. Using %1 worked when I unchecked regular expression. I was thinking I had to use a regular expression because I was trying all sorts of stuff after the %.

Thanks for pounding me in the noggin over and over.

And thank you too Nick for taking time for such a noob question.