Highlight on replace

Post Reply
Yaknar
Posts: 10
Joined: Mon Nov 16, 2009 7:44 pm

Highlight on replace

Post by Yaknar »

So, I can't quite figure out how to highlight text that I replaced.
selectString("You have recovered balance on all limbs.", 1)
replace("Let's get up and go.")
Is what I have, so I tried making a colorize trigger off of 'Let's get up and go.' but it didn't work out.
Is there something I did wrong, or is it possible to change color within the replace() command?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Highlight on replace

Post by Vadi »

Code: Select all

selectString("You have recovered balance on all limbs.", 1)
bg("green")
replace("Let's get up and go.")
resetFormat()
Remember that the line variable contains the current line that the trigger is on, so this is easier:

Code: Select all

selectString(line, 1)
bg("green")
replace("Let's get up and go.")
resetFormat()

Yaknar
Posts: 10
Joined: Mon Nov 16, 2009 7:44 pm

Re: Highlight on replace

Post by Yaknar »

That works great, thanks a lot!

Post Reply