Highlight first line

Post Reply
ajx
Posts: 1
Joined: Sat Jun 02, 2018 8:30 pm

Highlight first line

Post by ajx »

Hi,
I'm trying to create a trigger to highlight the first line with a color after inputs: look, n, w, s, e, nw... etc. Can anyone help out?

Jor'Mox
Posts: 1146
Joined: Wed Apr 03, 2013 2:19 am

Re: Highlight first line

Post by Jor'Mox »

The first part is super easy. Just make a trigger that highlights the line with that color, and then disables itself. The code would just be this: disableTrigger("TRIGGER NAME HERE")

For the second part, you need to make an alias that matches all of the possible commands you are looking to have it trigger after, and then have it enable that trigger. Your alias pattern might look something like this: ^(look|[ns][ew]?|[ew]|[ud])$
And the code would look like this: enableTrigger("TRIGGER NAME HERE")
send(matches[2],false)

Post Reply