Creating new windows?
#183862
23/08/07 05:11 AM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
Hi, I'm trying to create a new window (@Notice) for all 'notices' to relay to. However, when I do this, ALL notices go to the same @Notice window, regardless of what network the notice was sent from. Here's the script I'm using now:
on ^*:NOTICE:*:* { window -ael @Notice aline @Notice ( $+ $nick $+ ): $1- halt }
Is there a way to tell remotes what network the notice is coming from, and have it open @Notice under the said network's tree? Also, is it possible to make the default font for this window "Arial"?
Thanks in advance for your support.
~Kevin
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183863
23/08/07 05:24 AM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
Okay, I fixed it myself. Here's what I came up with: ON ^*:NOTICE:*:*: {
$iif(!$window($+(@Notices-,$network)),window -aelk0 $+(@Notices-,$network))
aline $+(@Notices-,$network) 4( $+ $nick $+ ): $1-
beep
halt
}
Still, I need to create it with an Arial font. 
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183866
23/08/07 05:57 AM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
(Just for support purposes) I got the font working correctly. Here's my final code: ON ^*:NOTICE:*:*: {
$iif(!$window($+(@Notices-,$network)),window -g1ael $+(@Notices-,$network) Arial 12)
aline $+(@Notices-,$network) $chr(3) $+ 04 $+ ( $+ $nick $+ ): $1-
beep
halt
}
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183870
23/08/07 08:40 AM
|
Joined: Jan 2007
Posts: 31
piker
Ameglian cow
|
Ameglian cow
Joined: Jan 2007
Posts: 31 |
How cool somebody posts a script when resolved  This will help everyone thanks 
|
|
|
Re: Creating new windows?
[Re: piker]
#183873
23/08/07 09:33 AM
|
Joined: Dec 2002
Posts: 3,547
SladeKraven
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yup, when someone finds the answer, they don't have to share but it helps others to benefit if they have similar issues. There have been a few people in the past who don't share the answer.
|
|
|
Re: Creating new windows?
[Re: SladeKraven]
#183918
23/08/07 06:46 PM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
Okay, here's what you can do to get the window to change colors when a new notice arrives and the @Notice window isn't active:
ON ^*:NOTICE:*:*: {
$iif(!$window($+(@Notices-,$network)),window -ael $+(@Notices-,$network) Arial 12)
aline $+(@Notices-,$network) 4( $+ $nick $+ ): $1-
window -g1 $+(@Notices-,$network)
beep
halt
} Notice the 'wingow -g1' line. Sorry I keep posting, but I think that every change that is made is vital to what people may want done.
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183925
23/08/07 08:25 PM
|
Joined: Dec 2002
Posts: 3,547
SladeKraven
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
How about adding: That way if $ebeeps are turned off (user choice) they won't hear those beeps. Just a suggestion.
|
|
|
Re: Creating new windows?
[Re: SladeKraven]
#183929
23/08/07 09:10 PM
|
Joined: Jun 2006
Posts: 508
deegee
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 508 |
How about adding: That way if $ebeeps are turned off (user choice) they won't hear those beeps. Just a suggestion. Not needed, /beep doen't work if $ebeeps = $false 
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183930
23/08/07 09:16 PM
|
Joined: Jun 2006
Posts: 508
deegee
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 508 |
Using aline -pi switches to to wrap and indent the text (and use the [c] parm to color it) Also "if !$window()" in place of $iif(!...) on ^*:notice:*:*:{
if (!$window($+(@Notices-,$network))) { window -ael $+(@Notices-,$network) Arial 12 }
aline -pi 4 $+(@Notices-,$network) ( $+ $nick $+ ): $1-
window -g1 $+(@Notices-,$network)
beep
halt
}
|
|
|
Re: Creating new windows?
[Re: deegee]
#183945
23/08/07 10:11 PM
|
Joined: Dec 2002
Posts: 503
Bekar
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
on ^*:notice:*:*:{
var %win = $+(@Notices-,$network)
if (!$window(%win)) { window -ael %win Arial 12 }
aline -pi 4 %win ( $+ $nick $+ ): $1-
window -g1 %win
beep
halt
} Neater, and doesn't have to evaluate $+() and $network so many times..  Just a query. Why use 'window -g1 ..' instead of 'aline -hpi ..' ?
|
|
|
Re: Creating new windows?
[Re: Bekar]
#183948
23/08/07 10:20 PM
|
Joined: Jun 2006
Posts: 508
deegee
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 508 |
Yeah, 'aline -h" is better again, thanks  on ^*:notice:*:*:{
var %win = $+(@Notices-,$network)
if (!$window(%win)) { window -ael %win Arial 12 }
aline -hpi 4 %win ( $+ $nick $+ ): $1-
beep
halt
}
|
|
|
Re: Creating new windows?
[Re: deegee]
#183972
24/08/07 03:04 AM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
erm, that latest code doesn't wrap the text. I just tried it. Any ideas on that?
|
|
|
Re: Creating new windows?
[Re: OMGWTFItsKevin]
#183995
24/08/07 10:31 AM
|
Joined: Dec 2002
Posts: 503
Bekar
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
Ah. It's a listbox. (window -ael). List boxes don't wrap.
As it's just notices, there's no need for it to be a list box.
(Edit: Oops, forgot to preview!)
Last edited by Bekar; 24/08/07 10:31 AM.
|
|
|
Re: Creating new windows?
[Re: Bekar]
#184001
24/08/07 12:03 PM
|
Joined: Aug 2007
Posts: 7
OMGWTFItsKevin
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2007
Posts: 7 |
Getting rid of the 'listbox' makes the text start from the bottom of the @Notice window, and I'd like it to start from the top and move down. Any ideas there? Not sure that can be done, and I'll probably just have to get over it.
|
|
|
|
|