mIRC Home    About    Download    Register    News    Help

Topic Options
#131909 - 05/10/05 10:56 PM dcc window
da_hype Offline
Vogon poet

Registered: 29/02/04
Posts: 119
Loc: Logan, Utah (USA)
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

Top
#131910 - 06/10/05 04:39 AM Re: dcc window
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
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

Top