Hopeless

Posted by Nick Gammon on Fri 02 Jan 2004 05:28 AM — 4 posts, 11,621 views.

Australia Forum Administrator #0

OK, this is simple enough. The trick is to make the keypad configuration send words (like 'keypad-0' which are then picked up by an alias.

First enter keypad configuration and assign a different word to each key, like this ...

Now add aliases for each of those words. To expand out a variable check 'expand variables', like this ...

To assign the target name you can just use the variables configuration screen, or make an alias like this ...



<aliases>
  <alias
   match="keypad-0"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>target = InputBox ("Enter new target name", "Target")
if target <> "" then
  SetVariable "target", target
end if</send>
  </alias>
</aliases>



(Copy between the lines and click on the 'Paste' button in the Alias configuration list).

Now pressing keypad '0' will bring up a dialog box asking for the new target name. Enter it and it will be assigned to the variable 'target' which is used in the earlier alias.

Australia Forum Administrator #1
What is it doing? Is it sending "keypad-0" to the MUD? Is there an error message?

As this alias uses "send to script" then scripting must be enabled for it to work.

You can make a simpler alias, eg.

Match: target *
Send: %1
Send to: Variable
Variable name: target

Then just type "target fred" to set the target to fred.
Australia Forum Administrator #2
In this version they are reserved, so you cannot use them.
Australia Forum Administrator #3
Keypad 9 is an alias?

Just press Ctrl+Enter in the "send" box to send it as two separate lines.