mIRC Home    About    Download    Register    News    Help

Print Thread
@windows #174955 15/04/07 01:54 AM
Joined: Apr 2007
Posts: 3
B
Bebop Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2007
Posts: 3
Just something I've noticed, but maybe a feature for normal @windows that can relay all text sent to a private message/dcc chat/channel, etc., to the selected @window

Just a thought.

Re: @windows [Re: Bebop] #174956 15/04/07 02:38 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This is so easily scriptable, it actually seems a waste to have it as a feature, considering the fact that most people probably wouldn't use it.
Code:
menu * {
Relay Window : set %relay.window $$?="Window Name" | set %relay.window $iif($left(%relay.window,1) != $chr(64),@) $+   %relay.window | .window %relay.window
}
on *:text:*:*:{
  if %relay.window {
    .aline %relay.window $1-
  }
}


Re: @windows [Re: RusselB] #175201 18/04/07 09:30 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
It would be "safer" to change the if to...

Code:
on *:text:*:*:{
  if $window(%relay.window) {
    .aline %relay.window $1-
  }
}


Last edited by NaquadaServ; 18/04/07 09:34 PM.

NaquadaBomb
www.mirc-dll.com
Re: @windows [Re: NaquadaServ] #175203 18/04/07 10:21 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
even safer!

Code:
on *:text:*:*:{
  if ($window(%relay.window).type isin listbox custom) {
    aline %relay.window $1-
  }
}


:S:S:S


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Re: @windows [Re: jaytea] #175204 18/04/07 10:29 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I don't see how, since all aline cares about is if $window(%relay.window) exists.


NaquadaBomb
www.mirc-dll.com
Re: @windows [Re: NaquadaServ] #175206 18/04/07 10:36 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
%relay.window could be a channel, and you can't /aline to a channel. It gives an error.

Re: @windows [Re: NaquadaServ] #175207 18/04/07 10:37 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
aline can't write to non-custom windows.

Of course if %relay.window was solely intended to be a custom window and it wasn't it'd probably be preferable to create some kind of error or warning message rather than let the script go on with what would presumably be undesired effects.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: @windows [Re: hixxy] #175208 18/04/07 10:49 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I would personally never allow the global variable to every be set to an invalid value in the first place. wink

Last edited by NaquadaServ; 18/04/07 10:53 PM.

NaquadaBomb
www.mirc-dll.com
Re: @windows [Re: NaquadaServ] #175435 22/04/07 05:31 PM
Joined: Apr 2007
Posts: 3
B
Bebop Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Apr 2007
Posts: 3
Uh, guys.

I didn't mean solely text :\

I was saying joins, quits, parts, ctcp's, users, bans, kicks, modes, the whole lot.

I doubt that just on text would cover all of that.

:S

Instead of having to make a whole script do to that, you could just have a param for /window that makes a window that makes a version of that channel, except you may customize the actions, events and such in the window, as if you had scripted this entire script to relay EVERYTHING that happened in the original channel to this new custom window.

It was just thought o _o

Btw, the on TEXT thing would just show the text, lol, not who said it.

Last edited by Bebop; 22/04/07 05:32 PM.
Re: @windows [Re: Bebop] #175454 22/04/07 10:35 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: Bebop
Btw, the on TEXT thing would just show the text, lol, not who said it.


Yes, it can. In your on TEXT event, you just do something like:

/aline @window $nick $1-

Obviously, you can format it how you want, including adding timestamps.

As for your suggestion, all text and events in a channel can be relayed to a specific @window easily. You can use on MODE, on ACTION, on TEXT, on INPUT, CTCP, on NOTICE, on JOIN, on QUIT, etc. Then, just use /aline or even ECHO to put the events/text into your @window in whatever format you choose.


Invision Support
#Invision on irc.irchighway.net
Re: @windows [Re: Riamus2] #175699 27/04/07 04:08 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Originally Posted By: Riamus2
Yes, it can. In your on TEXT event, you just do something like:

He was mentioning the code examples above.

Originally Posted By: Riamus2
As for your suggestion, all text and events in a channel can be relayed to a specific @window easily. You can use on MODE, on ACTION, on TEXT, on INPUT, CTCP, on NOTICE, on JOIN, on QUIT, etc. Then, just use /aline or even ECHO to put the events/text into your @window in whatever format you choose.

To me, it looks clear that the whole point is to have a /window parameter instead of messing with a script through all sorts of events (and end up not exactly copying the source window, since events don't catch everything that shows up in a window - a timer+$line method would do that, although it'd be very ugly for the event catching thing).

I think it's a good suggestion.


* cold edits his posts 24/7