mIRC Homepage
Posted By: Spoof ?? - 22/08/03 01:57 PM
on ^&*:events:.....

what is the sign og ^&* ???
Posted By: MrPeepers Re: ?? - 22/08/03 02:09 PM
^ halts mirc's usualy display of an event, youd use that to make a custom message like change how the join looks,
* makes a remote script accessiable by all users
The & prefix
You can prevent an event from being triggered if a previous script used /halt or /haltdef to halt the display of default text for an event by using the & prefix.

on &1:TEXT:*:?:/echo this event won't trigger if $halted is true

Posted By: LocutusofBorg Re: ?? - 23/08/03 06:39 AM
To be more specific: ^ by itself is worthless, just as haltdef is. But when used together. they will prevent the default output of an event (raw events and on input excepted).

Code:
on [color:blue]^[/color]*:TEXT:matchtext:location: {
  do stuff
  [color:blue]haltdef[/color]
}
Posted By: Hammer Re: ?? - 23/08/03 11:12 AM
To be even more specific: ^ changes the order in which the event is processed relative to mIRC's own event handlers.

1. on ^*:TEXT: fires first
2. mIRC gets its chance at it.
3. on *:TEXT: fires last

You do not necessarily always want to use halt/haltdef with it. If all you wish to do is print out a warning line for joining clones BEFORE the * Joins: line but are not going to reformat the normal * Joins: line, there is no need to /halt or /haltdef it.

If your event is simply going to log something and you don't care about reformatting the output, you can /halt in on *:TEXT: to just halt the script or /haltdef (depending on the event) which will halt no default text since that text has already been echoed out by mIRC's own event handlers. This might be useful if you have scripts loaded after the current script that you don't want an on &*:TEXT: to fire if $halted is true; in such a case, the only purpose of the first event with the /haltdef might even be simply to halt the rest of the on TEXT's. ("It's ok fellas, I've already handled this one.")
Posted By: qwerty Re: ?? - 23/08/03 02:06 PM
Yeah, you can do other nifty stuff with ^ too, like a dynamic Highlight list. The highlight list allows vars/identifiers as items. So you can put a %myhilite var in the list and have something like:

on ^*:text:*something*:#: set %myhilite somethingelse

mirc will fire the ^ event, set %myhilite accordingly and then apply the highlight settings with the updated variable smile
© mIRC Discussion Forums