mIRC Home    About    Download    Register    News    Help

Print Thread
#34042 04/07/03 12:43 PM
Joined: May 2003
Posts: 215
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2003
Posts: 215
I was recently experimenting with 'on TEXT' and 'on ACTION' events, using the $highlight identifier to trigger the events when my nickname is mentioned in a channel window, when I thought that it would be good if mIRC had an event which covered this specifically.
Something like on *:HIGHLIGHT:#: { } which would allow the person to set specific commands to be performed whenever the internal highlight (Options -> IRC -> Highlight) function is triggered.

Now before everyone starts posting on *:TEXT:*:#: { if ($me isin $1-) { } }, what I'm suggesting not only reacts to a match of $me, but anything that is stored in mIRC's highlight list.


- Jason
#34043 04/07/03 04:21 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I don't personally use the highlight feature, but I think this could be useful for people who do.

#34044 04/07/03 05:17 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Help file:
$highlight(N/text)
Returns the Nth line in the highlight listbox, or if text is specified, returns the properties for the highlight line that matches text.


This means that if you use $highlight($1-) in your on TEXT event, it would return the item in the Highlight List that actually caused the highlighting, if it did. If not, it would return $null. For example, $highlight(Hello qwerty! How are you?) would return "$me" (if, of course, I had added "$me" in the Highlight List). This feature practically provides a perfect substitute for an on HIGHLIGHT event. If you combine it with signals, you can even script such an event:
Code:
on *:text:*:#: if $highlight($1-) != $null { .signal -n highlight $ifmatch }
on *:signal:HIGHLIGHT:{ 
 echo -s Highlight triggered: $1-
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#34045 05/07/03 03:33 AM
Joined: May 2003
Posts: 215
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2003
Posts: 215
That's what I use at the moment, I just thought that a direct event would be more useful in some cases.


- Jason
#34046 05/07/03 05:51 AM
Joined: Mar 2003
Posts: 20
E
Ameglian cow
Offline
Ameglian cow
E
Joined: Mar 2003
Posts: 20
it just sucks when ppl type 1 or 2 or 3
haha

#34047 05/07/03 10:56 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Heh, true. Imo, there should be two separate identifiers so as to avoid such issues. In the meantime, you could add an if ($1- !isnum) check in the on TEXT event.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard