mIRC Home    About    Download    Register    News    Help

Print Thread
#139149 11/01/06 06:07 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
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?
#139150 13/01/06 12:31 AM
Joined: Sep 2003
Posts: 4,230
D
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.

#139151 13/01/06 02:41 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
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?
#139152 13/01/06 02:55 PM
Joined: Jan 2003
Posts: 2,523
Q
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
#139153 13/01/06 03:49 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
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?
#139154 13/01/06 03:54 PM
Joined: Feb 2004
Posts: 2,019
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.
#139155 13/01/06 04:18 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
I see your point ...


What do you do at the end of the world? Are you busy? Will you save us?
#139156 20/01/06 02:23 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
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?
#139157 20/01/06 02:39 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That already exists.

//window -n "status window"


Gone.
#139158 20/01/06 03:27 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
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?
#139159 28/01/06 09:28 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
$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?

Link Copied to Clipboard