Highlighting Script

By MichaelA on Jan 16, 2011

Well, I got bored, and made a highlight script. Basically, it makes a tip in the bottom corner if your screen if mIRC isn't the active window, and it also logs all highlights to a @Messages window

Enjoy ^_^

Edit: Thanks to Jethro_ for the help and fast reply :D

on *:TEXT:*:#:highlighter $1- 
ON *:ACTION:*:#:highlighter $1- 
alias -l highlighter {
  if ($regex($1-,/\Q $+ $me $+ \E\b/iS)) {
    set %highlighter.chan $chan | set %highlighter.msg $1- | set %highlighter.nick $nick | set %highlighter.network $network
    if ($appactive) { if ($chan != $active) { echo -at 4,1.:[7 $+ $network $+ 4]:. .:[8 $+ $chan $+ 4]:. .:[9 $+ $nick $+ 4]:. $1- | /2 } }
    if (!$appactive) { $tip(High,Highlight Alert, $+ .:[ $+ $network $+ ]:. .:[ $+ $chan $+ ]:. .:[ $+ $nick $+ ]:. $1- $+ ,60,$null,$null,1,$chan) }
  }
}
alias 1 {     
  window -a %highlighter.chan
  window -De @Messages
  echo -t @Messages 4,1.:[7 $+ %highlighter.network $+ 4]:. .:[8 $+ %highlighter.chan $+ 4]:. .:[9 $+ %highlighter.nick $+ 4]:. %highlighter.msg
  unset %highlighter*
}
alias 2 {
  window -De @Messages
  echo -t @Messages 4,1.:[ $+ %highlighter.network $+ 4]:. .:[8 $+ %highlighter.chan $+ 4]:. .:[9 $+ %highlighter.nick $+ 4]:. %highlighter.msg
  unset %highlighter*
}

Comments

Sign in to comment.
SweeneyTodd_   -  Apr 02, 2011

I don't get it.

 Respond  
Jethro   -  Jan 18, 2011

Ikki, the main reason your regex pattern won't work for "hello nick" is that you made the $1 without the dash affixed to it as (where I marked it red): > $1-Yes, I second napa's suggestion of using mirc's built-in highlight feature.

 Respond  
napa182   -  Jan 18, 2011

MichaelA you should incorp mirc's built in highlight into ur snippet

 Respond  
MichaelA   -  Jan 16, 2011

There we are :D
Just updated it xD

 Respond  
MichaelA   -  Jan 16, 2011

Ohh true xD I'll do that :3 thanks Jethro_!

Btw

ON action::#:highlighter $1-

;) missing a : there :P

 Respond  
Jethro   -  Jan 16, 2011

You should use an alias like this for the highlighter so you don't make two repeated routines for both action and text:

ON *:text:*:#:highlighter $1-
ON *action:*:#:highlighter $1-
alias -l highlighter {
  if ($regex($1-,/\Q $+ $me $+ \E\b/iS)) {
  ;the rest of code goes here
 Respond  
MichaelA   -  Jan 16, 2011

Eh I accidentally pressed the button twice, resulting in it posting twice :/

 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.