Try this:
Code:
wid2name {
  var %i = 1
  while $window(*,%i).wid {
    if $v1 == $1 { return $window(*,%i) }
    inc %i
  }
}
Example: //echo -a $wid2name(15)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com