Hi there,
i’m trying to create a startup script that search for some ip on my mikrotik and if found then disable it.
It look like work properly but when the command “/ip address disable xx” the script hang with
interrupted no such item
the script run recursively until the ip is disabled or timer value become 120.
:local index -1
:local timer 0
:while ($timer!=120) do={
[set index -1; :foreach line in=[/ip address print detail as-value] do={
[set index ($index+1); set timer ($timer+1); :foreach part in=$line do={
[
:if ($part=“address=192.168.3.254/22”) do={
[/ip address disable $index; :set timer 120]};
]}
]}
]}