mIRC Home    About    Download    Register    News    Help

Print Thread
#85965 08/06/04 06:10 PM
Joined: Mar 2004
Posts: 36
N
Nodren Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2004
Posts: 36
I'm attemting to draft a MTS engine, and in an effort to maintain a cleanliness to the style of it, i want to minimize all the windows mIRC currently has open.

Well my first attempt at this is really long and drawn out, and doesnt work right, i'll post a small snippet of one particular part that doesnt work, if you have any ideas, or possibly a completely different method then im using to fix this, any help is greatly appreciated!

Code:
  var %i = 0 | var %t = $scid(0)
  :start6
  inc %i 1
  if (%i > %t) { goto next6 }
  window $1 $scid(%i)
  goto start6
  :next6


Note: i used pretty much that exact same part several times, for $query $chan $window $get $send $fserve $chat, etc and $1 is filled with -n to minimize.

#85966 08/06/04 06:34 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try this:
Code:
alias minimizeall {
  var %i = 1, %o = $scon(0)
  while %o {
    scon %o
    dec %o
    %i = 1
    while $window(*,%i) { 
      window -n $+(",$ifmatch,")
      inc %i 
    }
  }
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard