|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 38 |
I dont seem to be able to get "on *:open:?:{ command }" to work (without quotes ofcourse) heres my simple code:
on *:open:?:{ echo -s Query closed }
Any ideas?? /me has mIRC 6.03
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
on *:open:?:{ echo -s Query closed } works fine, but it only triggers if a query window is opened by an incoming message, not if your open one yourself. Make sure that the event is this only on *:open:?:{ in the script file, and that your remotes processing is on (/remote on).
|
|
|
|
Joined: Dec 2002
Posts: 145
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 145 |
on OPEN/CLOSE
The on OPEN and on CLOSE events trigger for various events relating to the opening and closing of a window of different types of windows. In the case of dcc sessions, they trigger when a dcc connection has opened or closed.
Format: on <level>:OPEN|CLOSE:<?|@|=|!|*>:<matchtext>:<commands>
You are missing the "<matchtext>" parameter
/help on open
gemeau50
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
The matchtext is not required, although it does make the scipt look pretty
|
|
|
|
Joined: Dec 2002
Posts: 145
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 145 |
And your right.
Now if parameters shown between "< >" are not compulsory anymore, where do we go? lolll
Tx
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Actually there's an old bug with on OPEN, which makes the event not working in certain cases if you don't specify matchtext. I don't remember in which cases anymore (it was never quite clear anyway) but I remember it also had to do with whether the code is one-line or multi-line. Anyway, since then I always use the matchtext to be sure.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 38 |
Remote is on, but the idea was to get it to react to me opening a query and not an incoming message. got any ideas on how to achieve that? btw, it should say "Query opened"
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 774 |
alias query { !query $1$2- echo $1 query opened }
//if ( khaled isgod ) echo yes | else echo no
|
|
|
|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 38 |
Thx dude, made my day
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 417 |
this is a open code that will close an open window unless its by another op or yourself
ON *:OPEN:*:*: {
if (($nick isop $comchan($nick,1)) || ($me == $nick)) { halt }
else {
closemsg $nick
}
}
Now there is a simpler mirc command that will do the same thing by typing /ignore -p *!*@*
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Dec 2002
Posts: 191
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 191 |
the presumes that the op is just oped on the first common channel if they aren't opped on the first common chan but are on the second common channel it will still close the window.
|
|
|
|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 38 |
Anyone know how get an echo when closing a status window??
on *:disconnect:{ echo Disconnecting... }
Ive tried the above but it doesnt seem to work either..
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
on *:CLOSE:*: if $active == Status Window { <dostuff> }
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 38 |
doesnt work either
|
|
|
|
Joined: Feb 2003
Posts: 2
Bowl of petunias
|
Bowl of petunias
Joined: Feb 2003
Posts: 2 |
Sorry to bump this thread, but I do have a question here concerning theRAT's post on a query-alias.
I use mIRC under Debian Linux and wine, somehow mIRC does not save the default font so I try to set it after each window is being opened. Currently I have this:
on me:*:JOIN:#: font $chan -14 Terminus
This seems to work correctly. How can I set the font a) on getting a query and b) on opening one?
Thanks in advance, Kurt
|
|
|
|
Joined: Dec 2002
Posts: 1,237
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,237 |
try this i dont know if this works cause its off the top of my head
on 1:OPEN:?:/font -q <textsize> <font>
I think try that see if it does anything
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
There isn't a -q switch for /font.
on *:OPEN:?: font -ad -14 Terminus
alias query {
query $$1 $2-
.font -ad -14 Terminus
}
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
|
|
|
|
Joined: Dec 2002
Posts: 1,237
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,237 |
I wasnt sure or not LOL like i said i was goin off the top of my head...I stand corrected.
|
|
|
|
Joined: Feb 2003
Posts: 2
Bowl of petunias
|
Bowl of petunias
Joined: Feb 2003
Posts: 2 |
|
|
|
|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Jan 2003
Posts: 237 |
lol, you just HAD To look for this post :-p, if you find it, pm me
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
|