mIRC Home    About    Download    Register    News    Help

Print Thread
Wid support in /window #139149 11/01/06 06:07 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
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

Last edited by Jigsy; 11/01/06 07:46 PM.

What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139150 13/01/06 12:31 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
And along with it a method to get the $activewid since duplicate named windows you cant tell which one is active.

Re: Wid support in /window #139151 13/01/06 02:41 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
Theres always $window($scid($activecid).active).wid or $chan(#).wid ... but I like your idea :P

Last edited by Jigsy; 13/01/06 04:09 PM.

What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139152 13/01/06 02:55 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.

Last edited by qwerty; 13/01/06 02:58 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Wid support in /window #139153 13/01/06 03:49 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
What about $wid?

Quote:

$wid
Returns window id for current script.

Last edited by Jigsy; 13/01/06 04:08 PM.

What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139154 13/01/06 03:54 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
$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.



Gone.
Re: Wid support in /window #139155 13/01/06 04:18 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
I see your point ...


What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139156 20/01/06 02:23 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
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.


What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139157 20/01/06 02:39 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That already exists.

//window -n "status window"


Gone.
Re: Wid support in /window #139158 20/01/06 03:27 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
ahhh ...

I didn't know about that blush


What do you do at the end of the world? Are you busy? Will you save us?
Re: Wid support in /window #139159 28/01/06 09:28 PM
Joined: Nov 2004
Posts: 804
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 804
$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 }

Last edited by Jigsy; 28/01/06 10:20 PM.

What do you do at the end of the world? Are you busy? Will you save us?