Top

Highlight Specific Letters in a String

+ 0 likes
Please Register to submit score.
Average Score  2.0
Scores Submitted  1
Date Added  Mar 29, 2008
Last Updated  Mar 29, 2008

Introduction

Credit goes to the great scripter Gummo on Peercommons for the code, and to me, of course, for the idea :D. What it does is this: Say you type in a sentence or two. For example: There was a cat rampaging through the downtown area. <--lame but whatever.. It would change the colors the letters in the %word you chose as such: There wAs a cat Rampaging through the Downtown area. %word being tard. I dont believe i can change the colors for my post here so I've replaced the color highlighting with uppercase letters. It also doubles as a color script. Look through the code for comments on what to change to meet your needs.

To enable this script use /color on|off.


Grab the Code

Comments

  (7)  RSS
xDaeMoN
Comments: 696
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on Mar 29, 2008 11:08 am
It needs to be tested again.

* Invalid format: $mid (line 12, test.mrc)
Lysergic Diethylamide
Comments: 40
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on Mar 31, 2008 12:42 am
Hrm. Works just fine for me @_< i wonder what's wrong?
xDaeMoN
Comments: 696
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on Mar 31, 2008 2:42 am
Tried it on 2 diff mIRC & got the same error. You can also do this with just 1 while loop (basing it from your example).
jaytea
Comments: 13
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on Mar 31, 2008 2:52 pm
that's the ol' /var bug (i say old but it's just been fixed in the recent couple of versions)

adding the =, var %p1 = %p1 ... fixes it here. you should really upgrade though, xDaeMoN :P
xDaeMoN
Comments: 696
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on Mar 31, 2008 3:04 pm
lol I forgot about the bug with the /var command. I have been using the "=" with it so I kinda ignored that bug =P

I've been using 6.21, haven't upgraded to the latest though. ;) Thanks again for the update. I'll test this snippet again later.
Gummo
Comments: 104
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on May 29, 2008 1:04 am
This comment disappeared before, so please ignore it. :)
Gummo
Comments: 104
 
mIRC Snippet:  Highlight Specific Letters in a String
Posted on May 29, 2008 11:28 pm
Though you gave me credit, I don't know why you posted a script I made for you. However, this allowed me to recover it after mIRC erased it..

I've updated my version to only use one while loop, as xDaeMoN mentioned, which was planned to be done before the script was erased..

Also note that this script only highlights each letter once and doesn't highlight anything unless all letters are present in the correct order.

Please Register or Login to start posting comments.
Bottom