mIRC Homepage
Posted By: Doqnach on *:HIGHLIGHT:[#,?,=,*,etc...]: - 10/02/03 11:55 PM
an on HIGHLIGHT trigger would be a bliss for theme scripters...

Code:
on *:HIGHLIGHT:<*><?><#[,#]><=>: {
  ; if highlight is enabled
  if ($highlight) {
    ; nick who caused highlight
    echo -a $nick
    ; mathing highlight N
    echo -a $highlight($1-)
    ; text of line which was highlighted
    echo -a $1-
    ; highlight window button with $rgb() color or default
    ; color which was specified in $highlight(N).color
    /highlight <N|WID> [$rgb()|$highlight(N).color]
  }
}


these remain almost the same, just these changes:

Code:
$highlight
Returns $true if highlighting is turned on in the Highlight dialog, otherwise returns $false.

$highlight(N/text)
Returns the Nth line in the highlight listbox, or if text is specified, returns N of (first) matching highlight

Properties: text, color, sound, flash, message, nicks

Posted By: qwerty Re: on *:HIGHLIGHT:[#,?,=,*,etc...]: - 11/02/03 05:35 AM
If I understood what you mean, you don't need a separate event for that... Just use on TEXT and do a check if ($highlight($1-) != $null) ....

To highlight a line according to the Highlight settings, use /echo -l. It will automatically highlight the text if it matches an item in the Highlight section.
Posted By: Doqnach Re: on *:HIGHLIGHT:[#,?,=,*,etc...]: - 11/02/03 05:22 PM
that's partially true :-]

but I added some more features then just the trigger on highlight... like being able to highlight a window by command
Posted By: qwerty Re: on *:HIGHLIGHT:[#,?,=,*,etc...]: - 11/02/03 06:39 PM
This is possible too. Check out the /window's -g switch. For example,
/window -g2 #foo
colours the switchbar icon with the highlight color. So, to reproduce the highlight feature in a script you could have something like:
Code:
  echo -bflmrti <text>
  if ($highlight($1-) != $null) { window -g2 $chan }
Posted By: ahrens Re: on *:HIGHLIGHT:[#,?,=,*,etc...]: - 18/02/03 05:32 PM
Code:
 
on *:TEXT:*:#:{ 
  if ( $highlight($1-) != $null ) { 
    dll highlight.dll Popup ....  
   } 
}
 


This won't work, I got no idea why.
Target is to /dll highlight.dll whenever a word from my highlight-list is used, so there shouldn't be only the "normal" highlight. I don't know how do achieve this...
© mIRC Discussion Forums