mIRC Homepage
Posted By: Mog on *:OPEN - 28/11/05 10:06 AM
I have copied the line out of the help file ...

on *:OPEN:?:*:/echo -s Just opened $target query window

When I load it into the remotes, make sure remotes are on, then open a query window, it doesn't do anything. Anyone else experiencing this problem?

I am using a completly blank copy of mIRC, the only code in it outside of the default things is that line.
Posted By: Bob57 Re: on *:OPEN - 28/11/05 11:07 AM
It works for me, but only if I’m not the one that opens the query window, someone else needs to query me. And because of the -s switch the echo will display in the status window
Posted By: schaefer31 Re: on *:OPEN - 28/11/05 03:30 PM
The only way to trigger it yourself is by msg'ing yourself.

With a query window to yourself NOT opened do /msg <you> test
Then you should see the echo in status window.

Just double clicking a nick to open a query window will not do anything as you seem to be thinking. They have to msg you and a query window with them should not already be open.
Posted By: Mog Re: on *:OPEN - 29/11/05 01:03 AM
Does anyone know a way around this ... even if it's with a DLL or whatever?
Posted By: genius_at_work Re: on *:OPEN - 29/11/05 03:00 AM
I'm assuming that you want to be notified when you open a query window. The method I'm suggesting will only work when you double-click on a nickname in the nicklist of a channel.

Code:
- Open the options window (alt+o)
- Go to the 'Mouse' tab
- Paste the following in the textbox next to 'Nick List':

[color:blue]//query $$1 | echo -s Just opened $$1 query window[/color]

- Click OK


That will open a query window when you double-click on a nick in the nicklist, and it will echo a notification to the status window.

-genius_at_work
Posted By: Mog Re: on *:OPEN - 29/11/05 06:31 AM
Sweet, that will work, ... do you know of a way to edit that from the command line without having to restart mIRC?
Posted By: DaveC Re: on *:OPEN - 29/11/05 08:17 AM
This isnt perfect it can be fooled by a script closing a pm. But for the average user it works pretty well.

Code:
alias -l query.window.list { if (!$hget(query.window.list)) { hmake query.window.list } | return query.window.list }
;
on *:CLOSE:?:{ hdel $query.window.list $+($cid,$cr,$target) }
;on *:CLOSE:*:{ !.echo -q $input($target .ALL. closing,o) | if ($target == Status Window) { while ($hfind($query.window.list,$+($cid,$cr,*),1,w)) { hdel -s $query.window.list $v1 } } }
;
on *:OPEN:?:*:{ opened.query.window $target }
on *:ACTIVE:?:{ if (!$hget($query.window.list,$+($cid,$cr,$active))) { opened.query.window $active } }
;
alias opened.query.window {
  hadd -m $query.window.list $+($cid,$cr,$1) 1
  echo -s Just opened $1 query window
  ; any other code you like to do on a queryu window opening here.
}



another option is to do this (along with your ON OPEN)

Code:
alias query {
  if (($0) &amp;&amp; (!$window($1)) {
    query $1-
    if ($window($1)) { echo -s Just opened $1 query window }
  }
  else {
    query $1-
  }
}


but if someone uses /!query it well bypass it.
© mIRC Discussion Forums