|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Sat Jul 30, 2011 9:04 pm
Want to catch semicolons and change them to apostrophes, if possible |
Ok, I have this HORRIBLE typo problem, I hit ; when I mean to hit ' all the time, for years and years.
I'm wondering if there is a way to have the script do something like this:
Alias: Chat, replace ; with '
IE. "This is a chat message, do NOT use the semicolon, replace with with a apostrophe."
Yes, I know I can change the seperator character in "Special Characters", but that breaks hundreds of aliases and triggers, and the mud still uses semicolons as return codes.
Any useful suggestions would be VERY appreciated, thank you. |
|
Last edited by Lasivian on Mon Aug 01, 2011 10:19 pm; edited 4 times in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Jul 30, 2011 9:07 pm |
#ALIAS chatter {chat %replace(%0, ";", "'")}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Sun Jul 31, 2011 8:21 am |
shalimar wrote: |
#ALIAS chatter {chat %replace(%0, ";", "'")} |
that replaces the character, but it still acts like a return.
Thanks for the attempt tho :) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Jul 31, 2011 11:49 am |
you could just quote out the semicolon ~;
also, you could turn off the command line evaluation by clicking the computer symbol near the clock |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sun Jul 31, 2011 10:10 pm |
That doesn't help if he's doing it accidentally though, shalimar. Short of changing the character to separate commands, I don't think there's a way to do what you want.
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jul 31, 2011 11:08 pm |
Try this:
Code: |
#ONINPUT {chat (*)} {#NOINPUT;#SENDRAW {chat %replace(%1,";","'")}} |
|
|
|
|
jorjastandish Newbie
Joined: 01 Aug 2011 Posts: 1
|
Posted: Mon Aug 01, 2011 12:19 am |
charneus wrote: |
Try this:
Code: |
#ONINPUT {chat (*)} {#NOINPUT;#SENDRAW {chat %replace(%1,";","'")}} |
|
Thanks! This worked great!:D |
|
|
|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Mon Aug 01, 2011 4:00 am |
Trying to figure out why this post was moved from Zmud to Cmud.
Sorry for the troubles, it's a Zmud problem for me. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Aug 01, 2011 12:51 pm |
It wasn't moved from zMUD to CMUD. I just mistakenly thought it was CMUD.
I believe the correct way to replicate my above script in zMUD would be:
Code: |
#ONINPUT {chat (*)} {#GAG;#SEND {~chat %replace(%1,";","'")}} |
I don't have zMUD installed on this laptop, but let me know if that works. If not, I'll figure something out. |
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Mon Aug 01, 2011 2:09 pm |
It is in the CMUD forum though...
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Mon Aug 01, 2011 2:44 pm |
Odd... because when I looked at it, it clearly said zMUD at the time...
|
|
|
|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Mon Aug 01, 2011 5:38 pm |
Does not appear to work. Semicolon acts as it normally does.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Aug 01, 2011 8:39 pm |
My apologies. I acted too quickly and didn't notice the "thanks, this works great!" wasn't from the OP. We're back where we belong now.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Tue Aug 02, 2011 11:32 pm |
I think daern might be right, I can;t see any way to do this is zmud.
|
|
|
|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Thu Aug 04, 2011 5:41 am |
No new suggestions?
|
|
|
|
|
|