mIRC Home    About    Download    Register    News    Help

Print Thread
#7363 19/01/03 04:34 PM
T
toe_cutter
toe_cutter
T
I dont seem to be able to get "on *:open:?:{ command }" to work (without quotes ofcourse)

heres my simple code:
Code:
on *:open:?:{ echo -s Query closed }


Any ideas??

/me has mIRC 6.03

#7364 19/01/03 04:38 PM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
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).

#7365 19/01/03 04:41 PM
Joined: Dec 2002
Posts: 143
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 143
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

#7366 19/01/03 04:44 PM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
The matchtext is not required, although it does make the scipt look pretty smile

#7367 19/01/03 04:59 PM
Joined: Dec 2002
Posts: 143
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 143
And your right.

Now if parameters shown between "< >" are not compulsory anymore, where do we go? lolll

Tx

#7368 19/01/03 05:01 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
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.

#7369 19/01/03 05:09 PM
T
toe_cutter
toe_cutter
T
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" wink

#7370 19/01/03 06:08 PM
T
theRat
theRat
T
alias query {
!query $1$2-
echo $1 query opened
}

#7371 19/01/03 06:53 PM
T
toe_cutter
toe_cutter
T
Thx dude, made my day smile

#7372 20/01/03 06:49 AM
Joined: Dec 2002
Posts: 416
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 416
this is a open code that will close an open window unless its by another op or yourself

Code:
  

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 *!*@*

#7373 20/01/03 08:17 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
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.

#7374 20/01/03 04:41 PM
T
toe_cutter
toe_cutter
T
Anyone know how get an echo when closing a status window??
Code:
on *:disconnect:{ echo Disconnecting... }


Ive tried the above but it doesnt seem to work either..

#7375 22/01/03 05:15 AM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Code:
on *:CLOSE:*: if $active == Status Window { &lt;dostuff&gt; }

#7376 22/01/03 12:57 PM
T
toe_cutter
toe_cutter
T
doesnt work either frown

#7377 02/02/03 02:43 PM
K
Kurt
Kurt
K
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

#7378 03/02/03 03:38 AM
Joined: Dec 2002
Posts: 1,214
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,214
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

#7379 03/02/03 10:54 AM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
There isn't a -q switch for /font.
Code:

on *:OPEN:?: font -ad -14 Terminus
alias query {
  query $$1 $2-
  .font -ad -14 Terminus
}

#7380 03/02/03 04:20 PM
Joined: Dec 2002
Posts: 1,214
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,214
I wasnt sure or not LOL like i said i was goin off the top of my head...I stand corrected.

#7381 04/02/03 01:23 PM
K
Kurt
Kurt
K
Thanks Hammer, this one works very good for me cool laugh wink

#7382 18/02/03 04:13 AM
Joined: Jan 2003
Posts: 237
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
lol, you just HAD To look for this post :-p, if you find it, pm me smile


Link Copied to Clipboard