|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
an on HIGHLIGHT trigger would be a bliss for theme scripters...
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:
$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
If it ain't broken, don't fix it!
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
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.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
OP
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
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
If it ain't broken, don't fix it!
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
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: echo -bflmrti <text>
if ($highlight($1-) != $null) { window -g2 $chan }
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Feb 2003
Posts: 3
Self-satisified door
|
Self-satisified door
Joined: Feb 2003
Posts: 3 |
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...
|
|
|
|
|
|
|
|