mIRC Homepage
Posted By: Jigsy Wid support in /window - 11/01/06 06:07 PM
Quote:

/window [-abBcCdeEfg[N]hikl[N]mnoprRsvwxz] [-tN,..,N] [+bdeflLmnstx] <@name> [x y [w h]] [/command] [popup.txt] [font [size]] [iconfile [N]]


What I mean is /window [-abBcCdeEfg[N]hikl[N]mnoprRsvwxz] [-tN,..,N] [+bdeflLmnstx] <@name|wid> [x y [w h]] [/command] [popup.txt] [font [size]] [iconfile [N]]

I'll elaborate:

/window -a #chan

lets say #chan's wid is 7 ($chan(#chan).wid)

/window -a 7
Posted By: DaveC Re: Wid support in /window - 13/01/06 12:31 AM
And along with it a method to get the $activewid since duplicate named windows you cant tell which one is active.
Posted By: Jigsy Re: Wid support in /window - 13/01/06 02:41 PM
Theres always $window($scid($activecid).active).wid or $chan(#).wid ... but I like your idea :P
Posted By: qwerty Re: Wid support in /window - 13/01/06 02:55 PM
This won't work. There is only one active window each time (mirc doesn't store the last active window for each CID, which seems to be what you think $scid(N).active returns). And the problem is mainly with DCC windows, where you can have two or more windows with the same name on the same "connection": $active returns the name, so you don't know which one it is.

There is currently no way to get around this limitation, so $activewid is indeed necessary.
Posted By: Jigsy Re: Wid support in /window - 13/01/06 03:49 PM
What about $wid?

Quote:

$wid
Returns window id for current script.
Posted By: FiberOPtics Re: Wid support in /window - 13/01/06 03:54 PM
$wid only works when issuing a command from the command line (editbox)

I can't help to think that you didn't really pay attention to that thread in the Scripts & Popups forum initiated by greeny, where you even participated yourself. All of this has been covered already.

Put this in your remotes:

on *:open:=: echo -a $wid

And initiate a few times //dcc chat $me, it will always echo 1 (if you issue it in the first server window), regardless of which window you issue it from. In other words, it will echo the $wid of the server window where you issue this in.

Of course your little alias will work, you don't even need it, you can type //echo -a $wid that will work fine because as stated, you are issuing a command from that window.

Posted By: Jigsy Re: Wid support in /window - 13/01/06 04:18 PM
I see your point ...
Posted By: Jigsy Re: Wid support in /window - 20/01/06 02:23 PM
another nice thing would be Status Window support

/window -n #chan minimizes #chan

so /window -n Status or /window -n Network should minimize the status window.
Posted By: FiberOPtics Re: Wid support in /window - 20/01/06 02:39 PM
That already exists.

//window -n "status window"
Posted By: Jigsy Re: Wid support in /window - 20/01/06 03:27 PM
ahhh ...

I didn't know about that blush
Posted By: Jigsy Re: Wid support in /window - 28/01/06 09:28 PM
$lactivewid would also be nice ...

... This is my coded version, it still has the same sort of DCC problem though so its sort of on the same lines of $activewid.

Code:
on *:active:*:{
  var %x = 0
  while (%x &lt; $scon(0)) {
    inc %x 1
    if (%x == $lactivecid) {
      scon %x
      set %lactivewid = $window($lactive).wid
    }
  }
}

alias lactivewid { return %lactivewid }
© mIRC Discussion Forums