Custom highlighter v1.0.1

Information on mIRC scripts or other IRC related scripts for use by users.
1 post Page 1 of 1

Custom highlighter v1.0.1

Quote

Post by Daedalus »

This script creates tip boxes when a highlight would normally be triggered, but instead of the simplistic tip boxes a normal highlight creates appearing, instead you get much more information. Word, channel, and triggering text. Colors are kept.
Image


Installing is easy; simply place the script below anywhere into the remotes section of mirc's script editor. For the addition of words to follow, simply use mirc's in-built highlight dialog; this is found in the address book under the 'highlight' tab.

When adding a word through this tab, you must include text in the 'message' text area. Do not select the 'tip message' checkbox; the script pulls the text from this text area to use as the title for created tips.

Code: Select all

on *:TEXT:*:*: {
  var %chitminc = 0 | var %chitem = n $+ %chitminc | /var %chnick = $null
  var %chpost = $lower($strip($1-))
  while (%chitminc < $ini(mirc.ini,Highlight,0)) {
    var %chitem = $ini(mirc.ini,Highlight,$calc(%chitminc + 1))
    var %chreg = /(\b|^) $+ $lower($highlight($calc(%chitminc + 1))) $+ (\b|$)/Si
    if ($regex(%chpost,%chreg) == 1) {
      var %chnick = $gettok($noqt($gettok($readini(mirc.ini,Highlight,%chitem),6,44)),1,32)
      break
    }
    elseif ($regex(%chpost,%chreg) == 0) {
      inc %chitminc 1
    }
  }
  if (%chnick) {
    var %chname = %chnick $+ $rand(1,100)
    var %chtitle = $noqt($gettok($readini(mirc.ini,Highlight,[ %chitem ]),6,44)) $iif($target != $me,$target,$nick)
    if (($appactive == $false) || ($chan != $active)) {
      .timer -d 1 0 /noop $tip(%chname,[ %chtitle ],< $+ $nick $+ > $1-,20,$null,$null,$null,$window($chan).wid)
    }
  }
}
  • 1.0.1: Fix query window bug
  • 1.0: Creation
Daedalus
Dragon Coder
Posts: 160
Joined: October 9th, 2008, 5:15 am

1 post Page 1 of 1