1) $iif() is not the right tool for the job: if you want to execute commands on condition, just use /if. $iif() is for
returning values on condition. Besides, your $iif() is evaluating the condition in the current context (the calling script) and not in each connection's context (meaning
window -c "status window" is never returned, since $network is always equal to %current in the current context). The following should work:
alias close.win {
var %current = $network
scon -at1 if ($network != % $+ current) window -c "status window"
}
2) I'm not sure what you mean about the /timer. Wouldn't eg
/timer 1 5 close.win
do the job?