mikrotik events script New abroach

:global funcEventHandler do={
        :if (($2="(code)") or ([:len [:find $2 ("(eval")]]>0)) do={/log warning "On $1 is added a new item"}
        :return 0
}

:execute {
:global funcEventHandler
:local IDS;
/system script environment print count-only  interval=1 as-value  where [:if ([:len [:find $IDS $".id"]]=0) do={:set $IDS ($IDS,$".id");[$funcEventHandler $name [:tostr $value]]}];

}

or

  :execute {
    :local IDS;
    /system script environment print count-only  interval=1 as-value  where [
    :if ([:len [:find $IDS $".id"]]=0) do={
      :set $IDS ($IDS,$".id");
      :if (([:tostr $value]="(code)") or ([:len [:find [:tostr $value] ("(eval")]]>0)) do={
        /log warning "On $name is added a new item"
        }
      }
    ];
    }