Highlight Specific Letters in a String

By Lysergic Diethylamide on Mar 29, 2008

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.

Comments

Sign in to comment.
Gummo   -  May 29, 2008

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.

 Respond  
Gummo   -  May 29, 2008

This comment disappeared before, so please ignore it. :)

 Respond  
xDaeMoN   -  Mar 31, 2008

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.

 Respond  
jaytea   -  Mar 31, 2008

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

 Respond  
xDaeMoN   -  Mar 31, 2008

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).

 Respond  
Lysergic Diethylamide   -  Mar 31, 2008

Hrm. Works just fine for me @_< i wonder what\'s wrong?

 Respond  
xDaeMoN   -  Mar 29, 2008

It needs to be tested again.

  • Invalid format: $mid (line 12, test.mrc)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.