mIRC Home    About    Download    Register    News    Help

Print Thread
#131909 05/10/05 09:56 PM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
i used this code to close dcc window so i can show it in a dialog.
Code:
var %a = 1
    while ($window(*,%a)) {
      var %win = $window(*,%a),%fw = $gettok(%win,1,32)
      if ((%fw =send) || (%fw = ,get)) window -h $_bracket(%win)
      inc %a
    }




and this to show it in switchbar again, when dialog is closed.
Code:
 while ($window(*,%a)) {
    var %win = $window(*,%a),%fw = $gettok(%win,1,32)
    if ((%fw = send) || (%fw = get)) {
      if (%win) window -wa $_bracket(%win)
    }
    inc %a
  }



the hide works, but when i close the dialog and want to show dcc window back in switchbar it doesn't work. instead it detaches the dcc window. so when i minimize it, it minimizes at the bottom of mIRC. any idea how to fix this?

is this not right?? window -wa

#131910 06/10/05 03:39 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
your first block of code appears a bit stuffeed up, that might have been during pasting into the forum
ie: =send and = ,get

but anyway, i think the second one doesnt work becuase %a may not have been set to 1 to start with, you dont show us it at least.

Here is replacement code that also takes into account a BUG in the /window command which causes a script error on any window name that has 91+ characters to the name.
These windows are ignored (this is all you can do)

Code:
var %a = $window(*,0)
while (%a) {
  var %win = $window(*,%a), %fw = $gettok(%win,1,32)
  if (((%fw == send) || (%fw == get)) && ($len(%win) < 91)) { window -h $_bracket(%win) }
  dec %a
}

&
Code:
var %a = $window(*,0)
while (%a) {
  var %win = $window(*,%a), %fw = $gettok(%win,1,32)
  if (((%fw == send) || (%fw == get)) && ($len(%win) < 91)) { window -w $_bracket(%win) }
  dec %a
}

PS: Im assuming $_bracket() adds " " to the window name


Link Copied to Clipboard