mIRC Home    About    Download    Register    News    Help

Print Thread
Particular Channel in Focus #218403 12/02/10 10:30 PM
Joined: Dec 2002
Posts: 8
C
Cougar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2002
Posts: 8
I cannot seem to figure out how to have a channel come into focus via a script command. When I connect and join a channel, I'd like to have the channel become the active channel. Does anyone have any ideas? Thanks in advance.

Re: Particular Channel in Focus [Re: Cougar] #218404 12/02/10 10:52 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You can use /window -a, like in
Code:
on me:*:join:#: { window -a $chan }


Re: Particular Channel in Focus [Re: Horstl] #218405 12/02/10 11:03 PM
Joined: Dec 2002
Posts: 8
C
Cougar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2002
Posts: 8
That seems as if it is for custom windows only. Either that, or it's my version.

Re: Particular Channel in Focus [Re: Cougar] #218406 12/02/10 11:06 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Try:
Code:
on me:*:join:#:join $chan
to bring the active channel window to focus.

Re: Particular Channel in Focus [Re: Tomao] #218407 12/02/10 11:27 PM
Joined: Dec 2002
Posts: 8
C
Cougar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2002
Posts: 8
That did work. Thank you very much. I have not seen this "On me" event before. I'll have to study up on that one, however I cannot seem to find it in the help. Thanks guys, greatly appreciated.

Re: Particular Channel in Focus [Re: Cougar] #218408 12/02/10 11:31 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Hum, /window commands do work on channels for me... confused

Just out of curiosity, is this one working for you?
Code:
on me:*:join:#: {
  bset -t &a 1 $chan
  .timer -m 1 0 window -a $!regsubex( $bvar(&a,1-) ,/(\d+)(?: |$)/g,$chr(\1)) 
}
(a timer to fire the /window -a command after the on join event; the bset-regsubex-thingie to prevent an evaluation of the channel name)

The "me:"-prefix isn't documented in the helpfile smile It's explained e.g. in Undocumented mIRC

Last edited by Horstl; 12/02/10 11:36 PM.
Re: Particular Channel in Focus [Re: Horstl] #218409 12/02/10 11:57 PM
Joined: Dec 2002
Posts: 8
C
Cougar Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Dec 2002
Posts: 8
When I used "window -a $chan"
Status window showed "/window: invalid parameters"

When I used

on me:*:join:#: {
bset -t &a 1 $chan
.timer -m 1 0 window -a $!regsubex( $bvar(&a,1-) ,/(\d+)(?: |$)/g,$chr(\1))
}

I received
"/window: insufficient parameters"

Unfortunately, I have to use an older version of MIRC (6.03) so this may be the problem, although looking at help for both v6.03 and v6.35, it says /window is to be used for custom windows only.

Horstl,
Thank you for the undocumented help. That was nice to see.

Re: Particular Channel in Focus [Re: Cougar] #218410 13/02/10 12:10 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
/window works fine in channels for me on 6.35. Why you're using something MANY years old is beyond me.

Tested using //window -a #channel from edit line.

It also works fine in the on join event. Though I don't know why you need this. Just typing /join #channel will make that channel active.


Invision Support
#Invision on irc.irchighway.net
Re: Particular Channel in Focus [Re: Riamus2] #218420 13/02/10 01:00 PM
Joined: Sep 2003
Posts: 31
DiMTRX Offline
Ameglian cow
Offline
Ameglian cow
Joined: Sep 2003
Posts: 31
Will the -a parameter keep one window active and on screen during the loading of other scripted channels ? Was wondering about that cause joining 4 servers with approx 30 channels, and mIRC then focuses them one by one on join. Would be nice if that could be avoided.





Active mIRC user since 1998
Re: Particular Channel in Focus [Re: DiMTRX] #218421 13/02/10 01:19 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
You can issue a "/join -n #".
If the channel window wasn't created as yet (e.g. first connect), the chan will be joined in a minimized window (thus not stealing focus). And if the channel window was already open (e.g. after a a reconnect - requires "keep channels open" ticked in Options:IRC), mIRC won't switch the focus to that window either in the rejoin. Finally, the favorites have a "minimized join" checkbox (Alt-J:Edit) which does the same as the -n switch.

Last edited by Horstl; 13/02/10 01:21 PM.
Re: Particular Channel in Focus [Re: Cougar] #218422 13/02/10 01:19 PM
Joined: Jul 2006
Posts: 3,588
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,588
The /join command makes the joined channel the active window, this is by default.The -n switch let you join this channel with a minimized window (more than useful).
mIRC's option also let you choose if you want to join a channel minimized or not.
This could mean you're using a script that join channel minimized whereas you don't want this feature.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Particular Channel in Focus [Re: Wims] #218423 13/02/10 01:32 PM
Joined: Sep 2003
Posts: 31
DiMTRX Offline
Ameglian cow
Offline
Ameglian cow
Joined: Sep 2003
Posts: 31
Thanks for the info Wims & Horst, will try this out.


Active mIRC user since 1998
Re: Particular Channel in Focus [Re: Wims] #218430 13/02/10 06:58 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: Wims
This could mean you're using a script that join channel minimized whereas you don't want this feature.
I agree. Whatever script cougar is running has to be the culprit that stops the channel from being active.

Re: Particular Channel in Focus [Re: Wims] #218444 14/02/10 01:42 PM
Joined: Feb 2009
Posts: 133
C
chacha Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
Originally Posted By: Wims
mIRC's option also let you choose if you want to join a channel minimized or not.

i think this option it's only for query windows


WorldDMT