mIRC Homepage
Posted By: Derethil Minimizing all the windows - 17/03/04 04:28 PM
I created an alias that minimizes all the windows:

F12 {
var %i = $window(*,0)
while (%i >= 0) {
if ($count($active,$chr(32)) > 0) && ($window($active).state != minimized) window -n " $+ $active $+ "
else if ($window($active).state != minimized) window -n $active
dec %i
}
}

This works fine as long as I have only one connection. I have to press F12 twice if I have two connections. How to solve this problem?

Thanks.
Posted By: theRat Re: Minimizing all the windows - 17/03/04 04:29 PM
/help /scon
Posted By: tidy_trax Re: Minimizing all the windows - 17/03/04 05:26 PM
F11 {
var %i = $window(*,0)
while (%i >= 0) {
if ($count($active,$chr(32)) > 0) && ($window($active).state != minimized) window -n " $+ $active $+ "
else if ($window($active).state != minimized) window -n $active
dec %i
}
}
F12 { scon -a f11 }
Posted By: Derethil Re: Minimizing all the windows - 17/03/04 05:37 PM
Thank you. You were really fast smile.

I went througt the mIRC manual with /scon in my mind and came up with this myself:
Code:
 F12 {
  %yhteys = $scon(0)
  while (%yhteys > 0) {
    scon %yhteys {
      %i = $window(*,0)
      while (%i > 0) {
        if ($count($window(*,%i),$chr(32)) > 0) && ($window(*,%i).state != minimized) window -n " $+ $window(*,%i) $+ "
        else if ($window(*,%i).state != minimized) { window -n $window(*,%i) }
        dec %i
      }
    }
    dec %yhteys
  }
}

I found that tidy_trax's "scon -a" sometimes causes problems with $active identifier so dropped the idea of using $active.
© mIRC Discussion Forums