Yes, you must be using window 8 or higher, which doesn't handle $shortfn, you need to workaround that, by using the $md5 of the filename for example.

Code:
alias monitor {
  var %1 $1-
  if ($1 == list) {
    var %a 1
    echo -a * /monitor's list: 
    while ($timer(%a)) {
      if (monitor* iswm $v1) {
        echo -a $longfn($mid($v2,8))
      }
      inc %a
    }
  }
  elseif ($1 == off) {
    :del
    if ($hget(monitor,$md5($2-))) {
      if ($show) echo -a * /monitor: $2- has been removed from the watched list
      hdel monitor $md5($2-)
    }
    .timermonitor $+ $md5($2-) off 
  }
  elseif ($exists(%1)) {
    if ($isid) {
      tokenize 32 $hget(monitor,$md5(%1))
      ;to add the check on $md5 too, use "if ($file(%1).mtime > $2) && ($md5(%1,2) != $1) {"
      if ($file(%1).mtime > $2) && ($md5(%1,2) != $1) {
       DO SOMETHING HERE
      }
    }
    elseif ($show) echo -a * /monitor: $1- has been added to the watched list
    hadd -m monitor $iif($md5(%1),$v1 $v1) $file(%1).mtime
    .timermonitor $+ $v1 -m 0 100 noop $!monitor( %1 )
  }
  else .timer -h 1 0 monitor off %1
}
Should work, didn't try it.

"(1)" inside a folder name shouldn't be an issue

Last edited by Wims; 23/10/14 11:31 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel