Skip to content
Sparkpea Chat Network

Window -c

A TG007 community discussion started by sweetolddp.

Discussion 6 posts
Page 1 of 1
Open
Topic #10132 · 6 published posts · 3,294 views

i need help figuring out this code.

 

alias cwindow {

var %a = 1

while ($window(*,%a)) {

if ($chr(37) = $left($window(*,%a),1)) {

echo $window(*,%a) Closing $window(*,%a)

window -c $window(*,%a)

}

inc %a

}

}

 

it reads the windows correctly, echos the correct window that its closing it, but wont close it.

suggestions like, "right clicking to close the window" , or typing "/part" = fail.

i know those leave the channel.

i need this loop to work to close the windows with % as the first char in the window without using /part or /quit.

suggestions..?

 

is it even possible?

 

i'm not too sure. Try typing "//window -c $active" (without ") in the channel window and see if it closes.

However, closing a window, normally indicates "part", so it is weird that you are trying to do this? What are you trying to do it for?

if your trying to close the chan window.. why not use $chan instead of $window

pass.

thanks zan and TGK.

 

i ended up using both your suggestions with $chan and $active

 

Thanks

 

Try this...

 

alias cwindow {
var %a = 1
while ($window(*,%a)) {
if ($chr(37) = $left($window(*,%a),1)) {
echo $window(*,%a) Closing $window(*,%a)
part $window(*,%a)
}
inc %a
}
}

 

For some odd reason it looks like the command "window -c $window(*,%a)" isn't working, but using "part $window(*,%a)" will close the appropriate window.

It depends on how you connection is. You may need to activate the connection if you have more than one status window open.

 

/scon or /scid