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?