Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ A clansay alias

A clansay alias

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Lyman   (5 posts)  Bio
Date Sat 22 Sep 2012 06:26 PM (UTC)
Message
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.
Top

Posted by Fiendish   USA  (2,558 posts)  Bio   Global Moderator
Date Reply #1 on Sat 22 Sep 2012 09:48 PM (UTC)

Amended on Sat 22 Sep 2012 09:53 PM (UTC) by Fiendish

Message
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

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Lyman   (5 posts)  Bio
Date Reply #2 on Sun 23 Sep 2012 07:14 PM (UTC)
Message
My apologies. I read what you posted but it doesn't explain what I was specifically looking to do.

Thanks for you info though.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 23 Sep 2012 09:54 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Lyman   (5 posts)  Bio
Date Reply #4 on Mon 24 Sep 2012 12:59 AM (UTC)
Message
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.
Top

Posted by Fiendish   USA  (2,558 posts)  Bio   Global Moderator
Date Reply #5 on Mon 24 Sep 2012 01:43 AM (UTC)

Amended on Mon 24 Sep 2012 01:47 AM (UTC) by Fiendish

Message
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?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Lyman   (5 posts)  Bio
Date Reply #6 on Mon 24 Sep 2012 02:17 AM (UTC)
Message
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.

Top

Posted by Fiendish   USA  (2,558 posts)  Bio   Global Moderator
Date Reply #7 on Mon 24 Sep 2012 02:42 AM (UTC)

Amended on Mon 24 Sep 2012 01:27 PM (UTC) by Fiendish

Message
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.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #8 on Mon 24 Sep 2012 06:54 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Lyman   (5 posts)  Bio
Date Reply #9 on Tue 25 Sep 2012 12:22 AM (UTC)

Amended on Tue 25 Sep 2012 02:11 AM (UTC) by Lyman

Message
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.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


33,873 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.