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 ➜ Keypad and Variables

Keypad and Variables

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


Posted by Aheram   (23 posts)  Bio
Date Mon 27 Dec 2004 04:17 PM (UTC)
Message
I have set my the * in my Keypad to "glance at $target" ("$target" is from the MUD's own variable program). Is there a way of doing this on MUSH client? I notice that Keypads do not Expand Variables.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Mon 27 Dec 2004 08:00 PM (UTC)
Message
You use the keypad (or any other macro) to send an alias, which can either be one you use often (like "gt" or something that you might actually use as a normal alias) or something that you probably wont have a collision with (like "asdkjdflkajafdsf", or if youre really worried about it, generating a unique ID for it, you could probably even use KeypadAsterisk so that you'd know what it was).

Then you can do whatever you'd like (scripting, expanding variables) via the alias.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Mon 27 Dec 2004 08:15 PM (UTC)
Message
This comes up so often I have added a new menu command "generate unique ID". This lets you generate one of those random words without needing any scripting.

eg.

I use that to get a string like "b50c88e5f4deaf46cf7ad818".

Make your keypad send that.

Then make an alias to match on "b50c88e5f4deaf46cf7ad818". In the alias you can do:


glance at @target


Note the @ sign not the $. Then check "expand variables" in the alias. Then whatever is in the "target" variable will be sent. You can set up variables with another alias, or simply through the variable configuration screen.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


11,533 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.