mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 42
D
Demarko Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Sep 2003
Posts: 42
Hi.

I have some code, and I need to check if a query window is already opened or not.
How can this be done?

Code:
if ( ..... ) {
    query $nick
    .splay $mircdir $+ $readini($mircini, waves, query)
    }
do.some.more.stuff.here
....


Now as you see, '.splay $mircdir $+ $readini($mircini, waves, query)' is being played everytime the IF condition is true.
How can I make it to play only if the query window (/query $nick) is not opened already?

Many thanks in advance.

Joined: Dec 2002
Posts: 1,997
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,997
Code:

  if (!$query($nick)) {
    query $nick
    .splay $mircdir $+ $readini($mircini, waves, query)
  }
  do.some.more.stuff.here
  ....


Joined: Sep 2003
Posts: 42
D
Demarko Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Sep 2003
Posts: 42
Originally Posted By: RoCk
if (!$query($nick)) {

Thanks smile


Link Copied to Clipboard