mIRC Home    About    Download    Register    News    Help

Print Thread
#43583 22/08/03 01:57 PM
Joined: Jan 2003
Posts: 27
S
Spoof Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2003
Posts: 27
on ^&*:events:.....

what is the sign og ^&* ???


Tullamore Dew
#43584 22/08/03 02:09 PM
Joined: Aug 2003
Posts: 136
Vogon poet
Offline
Vogon poet
Joined: Aug 2003
Posts: 136
^ 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



In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#43585 23/08/03 06:39 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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]
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#43586 23/08/03 11:12 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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.")


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#43587 23/08/03 02:06 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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


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

Link Copied to Clipboard