I tried this:

Code:
on *:text:@wmfind *:%sLchannel: {
  var %i = %slid
  :loop
  while (%i >= 0) {
    if ($s2 isin $gettok(%sl [ $+ [ %i ] ],1,32)) { notice $nick Filename: $gettok(%sl [ $+ [ %i ] ],1,32) - Get file: /msg $me @wmget $gettok(%sl [ $+ [ %i ] ],2,32)
      set %i $calc(%i - 1)
      goto loop
    }
  }
}


but the script stops working when I try to do @wmfind something