|
PsychicSmurf Beginner
Joined: 12 Apr 2010 Posts: 11
|
Posted: Thu Apr 15, 2010 11:10 am
Separator Characters |
I have an old tool that stores speed walks. When I select one, it automatically puts the walk into the clipboard ready to paste into a mud client.
This worked fine when I used zMud, but I'm having difficulty in getting it to work in cMud.
An example speed walk I have is: "W; W; W; Open West; W; W; W; N; " (without the quotes)
Now, if I manually edited this text, and removed the spaces after the semi-colons, it works fine.
zMud accepted the spaces there, cMud (out of the box) doesn't.
How can I setup cMud to accept a speedwalk in this format? (I change change the old compiled utility to give different output) |
|
|
|
PsychicSmurf Beginner
Joined: 12 Apr 2010 Posts: 11
|
Posted: Thu Apr 15, 2010 11:11 am |
Note: I tried an alias to swap "; " to ";" but it didn't work.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Apr 15, 2010 2:07 pm |
You should be able to use %replace(string, " ", "")
to get rid of the white spaces themselves. |
|
|
|
PsychicSmurf Beginner
Joined: 12 Apr 2010 Posts: 11
|
Posted: Thu Apr 15, 2010 3:23 pm |
I've just tried that, and then it ends up sending "W;W;W;Open West;W;W;W;N;" to the mud, which is incorrect. The semi-colons should be parsed by cMud into new lines.
However, the mud then rejects that.
What I need to do is:
* parse the command line (which could have an extra keyword at the beginning to identify a speedwalk)
* remove the spaces after the semi-colons
* BUT THEN for cMud to parse the semi-colons so that each direction in the speedwalk is entered on a new line.
OR
For cMud to see the "; " as a newline separator... |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Apr 15, 2010 3:52 pm |
After you remove the spaces, use the #EXEC command to execute the string and send the individual commands to the MUD.
|
|
|
|
PsychicSmurf Beginner
Joined: 12 Apr 2010 Posts: 11
|
Posted: Thu Apr 15, 2010 4:04 pm |
Woot!
Many thanks, I can find place again! |
|
|
|
|
|