Solved by going back to the help files yet again and modifying one of the example scripts (instead of using a while loop that I couldn't make work)
alias AOP_remove_channel {
  set %ra 1
  set %nick $nick(#,%ra)
  if %nick == $null goto done
  if %nick isop # .aop -r %nick # 7
  inc %ra
  goto next

Thanks again everyone (I'll get this yet laugh )

I refuse to engage in a battle of wits with an unarmed person. wink