I'm not sure where to ask this. According to the mIRC help docs, haltdef shouldn't halt any processing, but I can't seem to get highlight working properly when using /haltdef in an on TEXT event. A testcase should be sufficient to demonstrate this.

Many of you will already know how to add a highlight. If you do, add one that you can easily trigger and skip this, but make sure you add a tooltip message and check the tip message checkbox.
1. Type /abook -h to get to the highlight window.
2. Check the "Enable highlight" checkbox, if it isn't already.
3. Click the "Add" button to get to the Add Highlight window.
4. Enter $me in the "Highlight lines that contain these words:" textbox.
5. Check the "Tip message:" checkbox and add this text to the "Message:" textbox down the bottom of the dialog: ring... ring...
6. Click "OK" back to the main mIRC screen.

Enter the following code into a new script and save it:
Code:
on ^1:TEXT:*:#: {
  echo # $+(<,$nick,>) $1-
  haltdef
}

You'll need 2 connections to trigger this, so open a new connection to the same server and join a common channel. Assuming the nickname for your first connection is foo and the nickname for your second connection is bar, activate the common channel window for bar and type /timer 1 5 say hi, foo! Switch to a different task, and wait 5 seconds.

I know mIRC help states "Note: Halting the default text for an event affects how mIRC displays the most basic information about IRC events to a user, so it should be used carefully.", but if I can't write a script that uses haltdef (or some alternative) and allows highlighting to function properly... well I see that as a significant loss of control and flexibility.

Granted, being able to halt the highlighting is great. It's what I was looking for earlier (to stop people from repeatedly highlighting me, which is very annoying) and I'm greatful that I've found this out. Is it possible to halt the default text, while allowing highlights to work properly?

Last edited by s00p; 05/12/09 04:06 AM.