|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Thu Jun 22, 2017 5:19 pm
How to send escape key to mud? |
Just like the title says. I need to send the key "Escape" directly to the mud as a command. How can I achieve this?
I'm using a remote program to access my computer that has CMud, but the remote program cannot send the ESC key, so I need a way to have CMud do it for me instead.
Any help is appreciated, thank you very much! |
|
|
|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Thu Jun 22, 2017 9:54 pm |
The #SENDRAW command should do it for you, using ascii code 27 for the escape key. So, you'd make an alias with the command #SENDRAW %char(27). Executing the alias would then send an escape character to the mud.
Mike |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Thu Jun 22, 2017 10:29 pm |
I tried using #send or #sendp, but not #sendraw. However, none of them work. When I do that, it says it fails, but it sends like a character itself to the mud, not the escape. Unless there's a different code for escape cmud uses?
The error (which is mud specific obviously) says:
There is no reason to ' here.
If I type lkj into the mud, it says:
There is no reason to 'lkj' here.
The difference tho, is the #sendraw %char(27) response doesn't have that trailing quote. |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Thu Jun 22, 2017 10:34 pm |
HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOLD ON! I've been asking the wrong question!!!
What I'm trying to do is send the escape key to CMUD itself... I need to abort the slow walk (#stop doesn't stop and I can't figure out why, unless I hit escape)..
Unless there's a better way to abort a speedwalk. I'm using #sl blah, with #pause and #step. But if I #stop blah, the next step I take, is followed by the rest of the speedwalk, sometimes hundreds of moves. |
|
|
|
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Fri Jun 23, 2017 10:34 pm |
Ah, what you have here then are two questions. The first question isn't about CMUD itself, but about the software you are using to access CMUD remotely. I would check that software's documentation to find out how to send unprintable/control keys.
As for ending your speedwalk through CMUD, the only thing I can suggest is to use #STOP without the name of the path. CMUD allows the "overloading" of the STOP command to halt a path or to end a thread, using the thread identifier. It is possible that adding the path identifier is causing CMUD to identify that as a command to end a thread rather than the walk. Using just #STOP with no following argument should halt the current path per the documentation, though I can't confirm that it will work.
Mike |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Fri Jun 23, 2017 11:30 pm |
Using #stop theoretically works, but in practicality does not. I send #stop all the time, and it says Slow Walking Aborted, but as soon as I move, it thinks it's okay to go, but since it isn't followed by #pause, it just spews out the rest of the directions.
I've thought about using #thread, but I'm unfamiliar with it and haven't quite figured it out yet. I'll maybe look into that for now.
Thank you! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Sat Jun 24, 2017 1:33 pm |
Sounds like your map is not in safe mode.
It's the man with the shield icon on the map.
That keeps the mapper from dumping all the movement commands at once.
#STOP can't stop the commands that have already been sent. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|